summaryrefslogtreecommitdiff
path: root/cli/dts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/dts')
-rw-r--r--cli/dts/lib.d.ts24
-rw-r--r--cli/dts/lib.deno.ns.d.ts2028
-rw-r--r--cli/dts/lib.deno.shared_globals.d.ts1657
-rw-r--r--cli/dts/lib.deno.unstable.d.ts1217
-rw-r--r--cli/dts/lib.deno.window.d.ts25
-rw-r--r--cli/dts/lib.deno.worker.d.ts43
-rw-r--r--cli/dts/lib.dom.d.ts20050
-rw-r--r--cli/dts/lib.dom.iterable.d.ts344
-rw-r--r--cli/dts/lib.es2015.collection.d.ts89
-rw-r--r--cli/dts/lib.es2015.core.d.ts517
-rw-r--r--cli/dts/lib.es2015.d.ts30
-rw-r--r--cli/dts/lib.es2015.generator.d.ts79
-rw-r--r--cli/dts/lib.es2015.iterable.d.ts509
-rw-r--r--cli/dts/lib.es2015.promise.d.ts150
-rw-r--r--cli/dts/lib.es2015.proxy.d.ts42
-rw-r--r--cli/dts/lib.es2015.reflect.d.ts35
-rw-r--r--cli/dts/lib.es2015.symbol.d.ts48
-rw-r--r--cli/dts/lib.es2015.symbol.wellknown.d.ts319
-rw-r--r--cli/dts/lib.es2016.array.include.d.ts118
-rw-r--r--cli/dts/lib.es2016.d.ts22
-rw-r--r--cli/dts/lib.es2016.full.d.ts25
-rw-r--r--cli/dts/lib.es2017.d.ts26
-rw-r--r--cli/dts/lib.es2017.full.d.ts25
-rw-r--r--cli/dts/lib.es2017.intl.d.ts32
-rw-r--r--cli/dts/lib.es2017.object.d.ts51
-rw-r--r--cli/dts/lib.es2017.sharedmemory.d.ts138
-rw-r--r--cli/dts/lib.es2017.string.d.ts47
-rw-r--r--cli/dts/lib.es2017.typedarrays.d.ts55
-rw-r--r--cli/dts/lib.es2018.asyncgenerator.d.ts79
-rw-r--r--cli/dts/lib.es2018.asynciterable.d.ts45
-rw-r--r--cli/dts/lib.es2018.d.ts26
-rw-r--r--cli/dts/lib.es2018.full.d.ts25
-rw-r--r--cli/dts/lib.es2018.intl.d.ts61
-rw-r--r--cli/dts/lib.es2018.promise.d.ts32
-rw-r--r--cli/dts/lib.es2018.regexp.d.ts39
-rw-r--r--cli/dts/lib.es2019.array.d.ts85
-rw-r--r--cli/dts/lib.es2019.d.ts25
-rw-r--r--cli/dts/lib.es2019.full.d.ts25
-rw-r--r--cli/dts/lib.es2019.object.d.ts35
-rw-r--r--cli/dts/lib.es2019.string.d.ts33
-rw-r--r--cli/dts/lib.es2019.symbol.d.ts26
-rw-r--r--cli/dts/lib.es2020.bigint.d.ts635
-rw-r--r--cli/dts/lib.es2020.d.ts25
-rw-r--r--cli/dts/lib.es2020.full.d.ts25
-rw-r--r--cli/dts/lib.es2020.promise.d.ts50
-rw-r--r--cli/dts/lib.es2020.string.d.ts30
-rw-r--r--cli/dts/lib.es2020.symbol.wellknown.d.ts39
-rw-r--r--cli/dts/lib.es5.d.ts4383
-rw-r--r--cli/dts/lib.es6.d.ts25
-rw-r--r--cli/dts/lib.esnext.array.d.ts223
-rw-r--r--cli/dts/lib.esnext.asynciterable.d.ts44
-rw-r--r--cli/dts/lib.esnext.bigint.d.ts629
-rw-r--r--cli/dts/lib.esnext.d.ts24
-rw-r--r--cli/dts/lib.esnext.full.d.ts25
-rw-r--r--cli/dts/lib.esnext.intl.d.ts32
-rw-r--r--cli/dts/lib.esnext.promise.d.ts43
-rw-r--r--cli/dts/lib.esnext.string.d.ts35
-rw-r--r--cli/dts/lib.esnext.symbol.d.ts26
-rw-r--r--cli/dts/lib.scripthost.d.ts327
-rw-r--r--cli/dts/lib.webworker.d.ts6027
-rw-r--r--cli/dts/lib.webworker.importscripts.d.ts26
-rw-r--r--cli/dts/typescript.d.ts6126
62 files changed, 47080 insertions, 0 deletions
diff --git a/cli/dts/lib.d.ts b/cli/dts/lib.d.ts
new file mode 100644
index 000000000..9152c4dfc
--- /dev/null
+++ b/cli/dts/lib.d.ts
@@ -0,0 +1,24 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es5" />
+/// <reference lib="dom" />
+/// <reference lib="webworker.importscripts" />
+/// <reference lib="scripthost" />
diff --git a/cli/dts/lib.deno.ns.d.ts b/cli/dts/lib.deno.ns.d.ts
new file mode 100644
index 000000000..962179381
--- /dev/null
+++ b/cli/dts/lib.deno.ns.d.ts
@@ -0,0 +1,2028 @@
+// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
+
+/// <reference no-default-lib="true" />
+/// <reference lib="esnext" />
+
+/** Deno provides extra properties on `import.meta`. These are included here
+ * to ensure that these are still available when using the Deno namepsace in
+ * conjunction with other type libs, like `dom`. */
+declare interface ImportMeta {
+ /** A string representation of the fully qualified module URL. */
+ url: string;
+
+ /** A flag that indicates if the current module is the main module that was
+ * called when starting the program under Deno.
+ *
+ * ```ts
+ * if (import.meta.main) {
+ * // this was loaded as the main module, maybe do some bootstrapping
+ * }
+ * ```
+ */
+ main: boolean;
+}
+
+/** Deno supports user timing Level 3 (see: https://w3c.github.io/user-timing)
+ * which is not widely supported yet in other runtimes. These types are here
+ * so that these features are still available when using the Deno namespace
+ * in conjunction with other type libs, like `dom`. */
+declare interface Performance {
+ /** Stores a timestamp with the associated name (a "mark"). */
+ mark(markName: string, options?: PerformanceMarkOptions): PerformanceMark;
+
+ /** Stores the `DOMHighResTimeStamp` duration between two marks along with the
+ * associated name (a "measure"). */
+ measure(
+ measureName: string,
+ options?: PerformanceMeasureOptions,
+ ): PerformanceMeasure;
+}
+
+declare interface PerformanceMarkOptions {
+ /** Metadata to be included in the mark. */
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ detail?: any;
+
+ /** Timestamp to be used as the mark time. */
+ startTime?: number;
+}
+
+declare interface PerformanceMeasureOptions {
+ /** Metadata to be included in the measure. */
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ detail?: any;
+
+ /** Timestamp to be used as the start time or string to be used as start
+ * mark.*/
+ start?: string | number;
+
+ /** Duration between the start and end times. */
+ duration?: number;
+
+ /** Timestamp to be used as the end time or string to be used as end mark. */
+ end?: string | number;
+}
+
+declare namespace Deno {
+ /** A set of error constructors that are raised by Deno APIs. */
+ export const errors: {
+ NotFound: ErrorConstructor;
+ PermissionDenied: ErrorConstructor;
+ ConnectionRefused: ErrorConstructor;
+ ConnectionReset: ErrorConstructor;
+ ConnectionAborted: ErrorConstructor;
+ NotConnected: ErrorConstructor;
+ AddrInUse: ErrorConstructor;
+ AddrNotAvailable: ErrorConstructor;
+ BrokenPipe: ErrorConstructor;
+ AlreadyExists: ErrorConstructor;
+ InvalidData: ErrorConstructor;
+ TimedOut: ErrorConstructor;
+ Interrupted: ErrorConstructor;
+ WriteZero: ErrorConstructor;
+ UnexpectedEof: ErrorConstructor;
+ BadResource: ErrorConstructor;
+ Http: ErrorConstructor;
+ Busy: ErrorConstructor;
+ };
+
+ /** The current process id of the runtime. */
+ export const pid: number;
+
+ /** Reflects the `NO_COLOR` environment variable.
+ *
+ * See: https://no-color.org/ */
+ export const noColor: boolean;
+
+ export interface TestDefinition {
+ fn: () => void | Promise<void>;
+ name: string;
+ ignore?: boolean;
+ /** If at lease one test has `only` set to true, only run tests that have
+ * `only` set to true and fail the test suite. */
+ only?: boolean;
+ /** Check that the number of async completed ops after the test is the same
+ * as number of dispatched ops. Defaults to true.*/
+ sanitizeOps?: boolean;
+ /** Ensure the test case does not "leak" resources - ie. the resource table
+ * after the test has exactly the same contents as before the test. Defaults
+ * to true. */
+ sanitizeResources?: boolean;
+ }
+
+ /** Register a test which will be run when `deno test` is used on the command
+ * line and the containing module looks like a test module.
+ * `fn` can be async if required.
+ * ```ts
+ * import {assert, fail, assertEquals} from "https://deno.land/std/testing/asserts.ts";
+ *
+ * Deno.test({
+ * name: "example test",
+ * fn(): void {
+ * assertEquals("world", "world");
+ * },
+ * });
+ *
+ * Deno.test({
+ * name: "example ignored test",
+ * ignore: Deno.build.os === "windows",
+ * fn(): void {
+ * // This test is ignored only on Windows machines
+ * },
+ * });
+ *
+ * Deno.test({
+ * name: "example async test",
+ * async fn() {
+ * const decoder = new TextDecoder("utf-8");
+ * const data = await Deno.readFile("hello_world.txt");
+ * assertEquals(decoder.decode(data), "Hello world");
+ * }
+ * });
+ * ```
+ */
+ export function test(t: TestDefinition): void;
+
+ /** Register a test which will be run when `deno test` is used on the command
+ * line and the containing module looks like a test module.
+ * `fn` can be async if required.
+ *
+ * ```ts
+ * import {assert, fail, assertEquals} from "https://deno.land/std/testing/asserts.ts";
+ *
+ * Deno.test("My test description", ():void => {
+ * assertEquals("hello", "hello");
+ * });
+ *
+ * Deno.test("My async test description", async ():Promise<void> => {
+ * const decoder = new TextDecoder("utf-8");
+ * const data = await Deno.readFile("hello_world.txt");
+ * assertEquals(decoder.decode(data), "Hello world");
+ * });
+ * ```
+ * */
+ export function test(name: string, fn: () => void | Promise<void>): void;
+
+ /** Exit the Deno process with optional exit code. If no exit code is supplied
+ * then Deno will exit with return code of 0.
+ *
+ * ```ts
+ * Deno.exit(5);
+ * ```
+ */
+ export function exit(code?: number): never;
+
+ export const env: {
+ /** Retrieve the value of an environment variable. Returns undefined if that
+ * key doesn't exist.
+ *
+ * ```ts
+ * console.log(Deno.env.get("HOME")); // e.g. outputs "/home/alice"
+ * console.log(Deno.env.get("MADE_UP_VAR")); // outputs "Undefined"
+ * ```
+ * Requires `allow-env` permission. */
+ get(key: string): string | undefined;
+
+ /** Set the value of an environment variable.
+ *
+ * ```ts
+ * Deno.env.set("SOME_VAR", "Value"));
+ * Deno.env.get("SOME_VAR"); // outputs "Value"
+ * ```
+ *
+ * Requires `allow-env` permission. */
+ set(key: string, value: string): void;
+
+ /** Delete the value of an environment variable.
+ *
+ * ```ts
+ * Deno.env.set("SOME_VAR", "Value"));
+ * Deno.env.delete("SOME_VAR"); // outputs "Undefined"
+ * ```
+ *
+ * Requires `allow-env` permission. */
+ delete(key: string): void;
+
+ /** Returns a snapshot of the environment variables at invocation.
+ *
+ * ```ts
+ * Deno.env.set("TEST_VAR", "A");
+ * const myEnv = Deno.env.toObject();
+ * console.log(myEnv.SHELL);
+ * Deno.env.set("TEST_VAR", "B");
+ * console.log(myEnv.TEST_VAR); // outputs "A"
+ * ```
+ *
+ * Requires `allow-env` permission. */
+ toObject(): { [index: string]: string };
+ };
+
+ /**
+ * Returns the path to the current deno executable.
+ *
+ * ```ts
+ * console.log(Deno.execPath()); // e.g. "/home/alice/.local/bin/deno"
+ * ```
+ *
+ * Requires `allow-read` permission.
+ */
+ export function execPath(): string;
+
+ /**
+ * Change the current working directory to the specified path.
+ *
+ * ```ts
+ * Deno.chdir("/home/userA");
+ * Deno.chdir("../userB");
+ * Deno.chdir("C:\\Program Files (x86)\\Java");
+ * ```
+ *
+ * Throws `Deno.errors.NotFound` if directory not found.
+ * Throws `Deno.errors.PermissionDenied` if the user does not have access
+ * rights
+ *
+ * Requires --allow-read.
+ */
+ export function chdir(directory: string): void;
+
+ /**
+ * Return a string representing the current working directory.
+ *
+ * If the current directory can be reached via multiple paths (due to symbolic
+ * links), `cwd()` may return any one of them.
+ *
+ * ```ts
+ * const currentWorkingDirectory = Deno.cwd();
+ * ```
+ *
+ * Throws `Deno.errors.NotFound` if directory not available.
+ *
+ * Requires --allow-read
+ */
+ export function cwd(): string;
+
+ export enum SeekMode {
+ Start = 0,
+ Current = 1,
+ End = 2,
+ }
+
+ export interface Reader {
+ /** Reads up to `p.byteLength` bytes into `p`. It resolves to the number of
+ * bytes read (`0` < `n` <= `p.byteLength`) and rejects if any error
+ * encountered. Even if `read()` resolves to `n` < `p.byteLength`, it may
+ * use all of `p` as scratch space during the call. If some data is
+ * available but not `p.byteLength` bytes, `read()` conventionally resolves
+ * to what is available instead of waiting for more.
+ *
+ * When `read()` encounters end-of-file condition, it resolves to EOF
+ * (`null`).
+ *
+ * When `read()` encounters an error, it rejects with an error.
+ *
+ * Callers should always process the `n` > `0` bytes returned before
+ * considering the EOF (`null`). Doing so correctly handles I/O errors that
+ * happen after reading some bytes and also both of the allowed EOF
+ * behaviors.
+ *
+ * Implementations should not retain a reference to `p`.
+ *
+ * Use Deno.iter() to turn a Reader into an AsyncIterator.
+ */
+ read(p: Uint8Array): Promise<number | null>;
+ }
+
+ export interface ReaderSync {
+ /** Reads up to `p.byteLength` bytes into `p`. It resolves to the number
+ * of bytes read (`0` < `n` <= `p.byteLength`) and rejects if any error
+ * encountered. Even if `read()` returns `n` < `p.byteLength`, it may use
+ * all of `p` as scratch space during the call. If some data is available
+ * but not `p.byteLength` bytes, `read()` conventionally returns what is
+ * available instead of waiting for more.
+ *
+ * When `readSync()` encounters end-of-file condition, it returns EOF
+ * (`null`).
+ *
+ * When `readSync()` encounters an error, it throws with an error.
+ *
+ * Callers should always process the `n` > `0` bytes returned before
+ * considering the EOF (`null`). Doing so correctly handles I/O errors that happen
+ * after reading some bytes and also both of the allowed EOF behaviors.
+ *
+ * Implementations should not retain a reference to `p`.
+ *
+ * Use Deno.iterSync() to turn a ReaderSync into an Iterator.
+ */
+ readSync(p: Uint8Array): number | null;
+ }
+
+ export interface Writer {
+ /** Writes `p.byteLength` bytes from `p` to the underlying data stream. It
+ * resolves to the number of bytes written from `p` (`0` <= `n` <=
+ * `p.byteLength`) or reject with the error encountered that caused the
+ * write to stop early. `write()` must reject with a non-null error if
+ * would resolve to `n` < `p.byteLength`. `write()` must not modify the
+ * slice data, even temporarily.
+ *
+ * Implementations should not retain a reference to `p`.
+ */
+ write(p: Uint8Array): Promise<number>;
+ }
+
+ export interface WriterSync {
+ /** Writes `p.byteLength` bytes from `p` to the underlying data
+ * stream. It returns the number of bytes written from `p` (`0` <= `n`
+ * <= `p.byteLength`) and any error encountered that caused the write to
+ * stop early. `writeSync()` must throw a non-null error if it returns `n` <
+ * `p.byteLength`. `writeSync()` must not modify the slice data, even
+ * temporarily.
+ *
+ * Implementations should not retain a reference to `p`.
+ */
+ writeSync(p: Uint8Array): number;
+ }
+
+ export interface Closer {
+ close(): void;
+ }
+
+ export interface Seeker {
+ /** Seek sets the offset for the next `read()` or `write()` to offset,
+ * interpreted according to `whence`: `Start` means relative to the
+ * start of the file, `Current` means relative to the current offset,
+ * and `End` means relative to the end. Seek resolves to the new offset
+ * relative to the start of the file.
+ *
+ * Seeking to an offset before the start of the file is an error. Seeking to
+ * any positive offset is legal, but the behavior of subsequent I/O
+ * operations on the underlying object is implementation-dependent.
+ * It returns the number of cursor position.
+ */
+ seek(offset: number, whence: SeekMode): Promise<number>;
+ }
+
+ export interface SeekerSync {
+ /** Seek sets the offset for the next `readSync()` or `writeSync()` to
+ * offset, interpreted according to `whence`: `Start` means relative
+ * to the start of the file, `Current` means relative to the current
+ * offset, and `End` means relative to the end.
+ *
+ * Seeking to an offset before the start of the file is an error. Seeking to
+ * any positive offset is legal, but the behavior of subsequent I/O
+ * operations on the underlying object is implementation-dependent.
+ */
+ seekSync(offset: number, whence: SeekMode): number;
+ }
+
+ /** Copies from `src` to `dst` until either EOF (`null`) is read from `src` or
+ * an error occurs. It resolves to the number of bytes copied or rejects with
+ * the first error encountered while copying.
+ *
+ * ```ts
+ * const source = await Deno.open("my_file.txt");
+ * const buffer = new Deno.Buffer()
+ * const bytesCopied1 = await Deno.copy(source, Deno.stdout);
+ * const bytesCopied2 = await Deno.copy(source, buffer);
+ * ```
+ *
+ * @param src The source to copy from
+ * @param dst The destination to copy to
+ * @param options Can be used to tune size of the buffer. Default size is 32kB
+ */
+ export function copy(
+ src: Reader,
+ dst: Writer,
+ options?: {
+ bufSize?: number;
+ },
+ ): Promise<number>;
+
+ /** Turns a Reader, `r`, into an async iterator.
+ *
+ * ```ts
+ * let f = await Deno.open("/etc/passwd");
+ * for await (const chunk of Deno.iter(f)) {
+ * console.log(chunk);
+ * }
+ * f.close();
+ * ```
+ *
+ * Second argument can be used to tune size of a buffer.
+ * Default size of the buffer is 32kB.
+ *
+ * ```ts
+ * let f = await Deno.open("/etc/passwd");
+ * const iter = Deno.iter(f, {
+ * bufSize: 1024 * 1024
+ * });
+ * for await (const chunk of iter) {
+ * console.log(chunk);
+ * }
+ * f.close();
+ * ```
+ *
+ * Iterator uses an internal buffer of fixed size for efficiency; it returns
+ * a view on that buffer on each iteration. It is therefore caller's
+ * responsibility to copy contents of the buffer if needed; otherwise the
+ * next iteration will overwrite contents of previously returned chunk.
+ */
+ export function iter(
+ r: Reader,
+ options?: {
+ bufSize?: number;
+ },
+ ): AsyncIterableIterator<Uint8Array>;
+
+ /** Turns a ReaderSync, `r`, into an iterator.
+ *
+ * ```ts
+ * let f = Deno.openSync("/etc/passwd");
+ * for (const chunk of Deno.iterSync(f)) {
+ * console.log(chunk);
+ * }
+ * f.close();
+ * ```
+ *
+ * Second argument can be used to tune size of a buffer.
+ * Default size of the buffer is 32kB.
+ *
+ * ```ts
+ * let f = await Deno.open("/etc/passwd");
+ * const iter = Deno.iterSync(f, {
+ * bufSize: 1024 * 1024
+ * });
+ * for (const chunk of iter) {
+ * console.log(chunk);
+ * }
+ * f.close();
+ * ```
+ *
+ * Iterator uses an internal buffer of fixed size for efficiency; it returns
+ * a view on that buffer on each iteration. It is therefore caller's
+ * responsibility to copy contents of the buffer if needed; otherwise the
+ * next iteration will overwrite contents of previously returned chunk.
+ */
+ export function iterSync(
+ r: ReaderSync,
+ options?: {
+ bufSize?: number;
+ },
+ ): IterableIterator<Uint8Array>;
+
+ /** Synchronously open a file and return an instance of `Deno.File`. The
+ * file does not need to previously exist if using the `create` or `createNew`
+ * open options. It is the callers responsibility to close the file when finished
+ * with it.
+ *
+ * ```ts
+ * const file = Deno.openSync("/foo/bar.txt", { read: true, write: true });
+ * // Do work with file
+ * Deno.close(file.rid);
+ * ```
+ *
+ * Requires `allow-read` and/or `allow-write` permissions depending on options.
+ */
+ export function openSync(path: string | URL, options?: OpenOptions): File;
+
+ /** Open a file and resolve to an instance of `Deno.File`. The
+ * file does not need to previously exist if using the `create` or `createNew`
+ * open options. It is the callers responsibility to close the file when finished
+ * with it.
+ *
+ * ```ts
+ * const file = await Deno.open("/foo/bar.txt", { read: true, write: true });
+ * // Do work with file
+ * Deno.close(file.rid);
+ * ```
+ *
+ * Requires `allow-read` and/or `allow-write` permissions depending on options.
+ */
+ export function open(
+ path: string | URL,
+ options?: OpenOptions,
+ ): Promise<File>;
+
+ /** Creates a file if none exists or truncates an existing file and returns
+ * an instance of `Deno.File`.
+ *
+ * ```ts
+ * const file = Deno.createSync("/foo/bar.txt");
+ * ```
+ *
+ * Requires `allow-read` and `allow-write` permissions.
+ */
+ export function createSync(path: string | URL): File;
+
+ /** Creates a file if none exists or truncates an existing file and resolves to
+ * an instance of `Deno.File`.
+ *
+ * ```ts
+ * const file = await Deno.create("/foo/bar.txt");
+ * ```
+ *
+ * Requires `allow-read` and `allow-write` permissions.
+ */
+ export function create(path: string | URL): Promise<File>;
+
+ /** Synchronously read from a resource ID (`rid`) into an array buffer (`buffer`).
+ *
+ * Returns either the number of bytes read during the operation or EOF
+ * (`null`) if there was nothing more to read.
+ *
+ * It is possible for a read to successfully return with `0` bytes. This does
+ * not indicate EOF.
+ *
+ * This function is one of the lowest level APIs and most users should not
+ * work with this directly, but rather use Deno.readAllSync() instead.
+ *
+ * **It is not guaranteed that the full buffer will be read in a single call.**
+ *
+ * ```ts
+ * // if "/foo/bar.txt" contains the text "hello world":
+ * const file = Deno.openSync("/foo/bar.txt");
+ * const buf = new Uint8Array(100);
+ * const numberOfBytesRead = Deno.readSync(file.rid, buf); // 11 bytes
+ * const text = new TextDecoder().decode(buf); // "hello world"
+ * Deno.close(file.rid);
+ * ```
+ */
+ export function readSync(rid: number, buffer: Uint8Array): number | null;
+
+ /** Read from a resource ID (`rid`) into an array buffer (`buffer`).
+ *
+ * Resolves to either the number of bytes read during the operation or EOF
+ * (`null`) if there was nothing more to read.
+ *
+ * It is possible for a read to successfully return with `0` bytes. This does
+ * not indicate EOF.
+ *
+ * This function is one of the lowest level APIs and most users should not
+ * work with this directly, but rather use Deno.readAll() instead.
+ *
+ * **It is not guaranteed that the full buffer will be read in a single call.**
+ *
+ * ```ts
+ * // if "/foo/bar.txt" contains the text "hello world":
+ * const file = await Deno.open("/foo/bar.txt");
+ * const buf = new Uint8Array(100);
+ * const numberOfBytesRead = await Deno.read(file.rid, buf); // 11 bytes
+ * const text = new TextDecoder().decode(buf); // "hello world"
+ * Deno.close(file.rid);
+ * ```
+ */
+ export function read(rid: number, buffer: Uint8Array): Promise<number | null>;
+
+ /** Synchronously write to the resource ID (`rid`) the contents of the array
+ * buffer (`data`).
+ *
+ * Returns the number of bytes written. This function is one of the lowest
+ * level APIs and most users should not work with this directly, but rather use
+ * Deno.writeAllSync() instead.
+ *
+ * **It is not guaranteed that the full buffer will be written in a single
+ * call.**
+ *
+ * ```ts
+ * const encoder = new TextEncoder();
+ * const data = encoder.encode("Hello world");
+ * const file = Deno.openSync("/foo/bar.txt", {write: true});
+ * const bytesWritten = Deno.writeSync(file.rid, data); // 11
+ * Deno.close(file.rid);
+ * ```
+ */
+ export function writeSync(rid: number, data: Uint8Array): number;
+
+ /** Write to the resource ID (`rid`) the contents of the array buffer (`data`).
+ *
+ * Resolves to the number of bytes written. This function is one of the lowest
+ * level APIs and most users should not work with this directly, but rather use
+ * Deno.writeAll() instead.
+ *
+ * **It is not guaranteed that the full buffer will be written in a single
+ * call.**
+ *
+ * ```ts
+ * const encoder = new TextEncoder();
+ * const data = encoder.encode("Hello world");
+ * const file = await Deno.open("/foo/bar.txt", { write: true });
+ * const bytesWritten = await Deno.write(file.rid, data); // 11
+ * Deno.close(file.rid);
+ * ```
+ */
+ export function write(rid: number, data: Uint8Array): Promise<number>;
+
+ /** Synchronously seek a resource ID (`rid`) to the given `offset` under mode
+ * given by `whence`. The new position within the resource (bytes from the
+ * start) is returned.
+ *
+ * ```ts
+ * const file = Deno.openSync('hello.txt', {read: true, write: true, truncate: true, create: true});
+ * Deno.writeSync(file.rid, new TextEncoder().encode("Hello world"));
+ * // advance cursor 6 bytes
+ * const cursorPosition = Deno.seekSync(file.rid, 6, Deno.SeekMode.Start);
+ * console.log(cursorPosition); // 6
+ * const buf = new Uint8Array(100);
+ * file.readSync(buf);
+ * console.log(new TextDecoder().decode(buf)); // "world"
+ * ```
+ *
+ * The seek modes work as follows:
+ *
+ * ```ts
+ * // Given file.rid pointing to file with "Hello world", which is 11 bytes long:
+ * // Seek 6 bytes from the start of the file
+ * console.log(Deno.seekSync(file.rid, 6, Deno.SeekMode.Start)); // "6"
+ * // Seek 2 more bytes from the current position
+ * console.log(Deno.seekSync(file.rid, 2, Deno.SeekMode.Current)); // "8"
+ * // Seek backwards 2 bytes from the end of the file
+ * console.log(Deno.seekSync(file.rid, -2, Deno.SeekMode.End)); // "9" (e.g. 11-2)
+ * ```
+ */
+ export function seekSync(
+ rid: number,
+ offset: number,
+ whence: SeekMode,
+ ): number;
+
+ /** Seek a resource ID (`rid`) to the given `offset` under mode given by `whence`.
+ * The call resolves to the new position within the resource (bytes from the start).
+ *
+ * ```ts
+ * const file = await Deno.open('hello.txt', {read: true, write: true, truncate: true, create: true});
+ * await Deno.write(file.rid, new TextEncoder().encode("Hello world"));
+ * // advance cursor 6 bytes
+ * const cursorPosition = await Deno.seek(file.rid, 6, Deno.SeekMode.Start);
+ * console.log(cursorPosition); // 6
+ * const buf = new Uint8Array(100);
+ * await file.read(buf);
+ * console.log(new TextDecoder().decode(buf)); // "world"
+ * ```
+ *
+ * The seek modes work as follows:
+ *
+ * ```ts
+ * // Given file.rid pointing to file with "Hello world", which is 11 bytes long:
+ * // Seek 6 bytes from the start of the file
+ * console.log(await Deno.seek(file.rid, 6, Deno.SeekMode.Start)); // "6"
+ * // Seek 2 more bytes from the current position
+ * console.log(await Deno.seek(file.rid, 2, Deno.SeekMode.Current)); // "8"
+ * // Seek backwards 2 bytes from the end of the file
+ * console.log(await Deno.seek(file.rid, -2, Deno.SeekMode.End)); // "9" (e.g. 11-2)
+ * ```
+ */
+ export function seek(
+ rid: number,
+ offset: number,
+ whence: SeekMode,
+ ): Promise<number>;
+
+ /** Close the given resource ID (rid) which has been previously opened, such
+ * as via opening or creating a file. Closing a file when you are finished
+ * with it is important to avoid leaking resources.
+ *
+ * ```ts
+ * const file = await Deno.open("my_file.txt");
+ * // do work with "file" object
+ * Deno.close(file.rid);
+ * ````
+ */
+ export function close(rid: number): void;
+
+ /** The Deno abstraction for reading and writing files. */
+ export class File
+ implements
+ Reader,
+ ReaderSync,
+ Writer,
+ WriterSync,
+ Seeker,
+ SeekerSync,
+ Closer {
+ readonly rid: number;
+ constructor(rid: number);
+ write(p: Uint8Array): Promise<number>;
+ writeSync(p: Uint8Array): number;
+ read(p: Uint8Array): Promise<number | null>;
+ readSync(p: Uint8Array): number | null;
+ seek(offset: number, whence: SeekMode): Promise<number>;
+ seekSync(offset: number, whence: SeekMode): number;
+ close(): void;
+ }
+
+ /** A handle for `stdin`. */
+ export const stdin: Reader & ReaderSync & Closer & { rid: number };
+ /** A handle for `stdout`. */
+ export const stdout: Writer & WriterSync & Closer & { rid: number };
+ /** A handle for `stderr`. */
+ export const stderr: Writer & WriterSync & Closer & { rid: number };
+
+ export interface OpenOptions {
+ /** Sets the option for read access. This option, when `true`, means that the
+ * file should be read-able if opened. */
+ read?: boolean;
+ /** Sets the option for write access. This option, when `true`, means that
+ * the file should be write-able if opened. If the file already exists,
+ * any write calls on it will overwrite its contents, by default without
+ * truncating it. */
+ write?: boolean;
+ /**Sets the option for the append mode. This option, when `true`, means that
+ * writes will append to a file instead of overwriting previous contents.
+ * Note that setting `{ write: true, append: true }` has the same effect as
+ * setting only `{ append: true }`. */
+ append?: boolean;
+ /** Sets the option for truncating a previous file. If a file is
+ * successfully opened with this option set it will truncate the file to `0`
+ * size if it already exists. The file must be opened with write access
+ * for truncate to work. */
+ truncate?: boolean;
+ /** Sets the option to allow creating a new file, if one doesn't already
+ * exist at the specified path. Requires write or append access to be
+ * used. */
+ create?: boolean;
+ /** Defaults to `false`. If set to `true`, no file, directory, or symlink is
+ * allowed to exist at the target location. Requires write or append
+ * access to be used. When createNew is set to `true`, create and truncate
+ * are ignored. */
+ createNew?: boolean;
+ /** Permissions to use if creating the file (defaults to `0o666`, before
+ * the process's umask).
+ * Ignored on Windows. */
+ mode?: number;
+ }
+
+ /**
+ *
+ * Check if a given resource id (`rid`) is a TTY.
+ *
+ * ```ts
+ * // This example is system and context specific
+ * const nonTTYRid = Deno.openSync("my_file.txt").rid;
+ * const ttyRid = Deno.openSync("/dev/tty6").rid;
+ * console.log(Deno.isatty(nonTTYRid)); // false
+ * console.log(Deno.isatty(ttyRid)); // true
+ * Deno.close(nonTTYRid);
+ * Deno.close(ttyRid);
+ * ```
+ */
+ export function isatty(rid: number): boolean;
+
+ /** A variable-sized buffer of bytes with `read()` and `write()` methods.
+ *
+ * Deno.Buffer is almost always used with some I/O like files and sockets. It
+ * allows one to buffer up a download from a socket. Buffer grows and shrinks
+ * as necessary.
+ *
+ * Deno.Buffer is NOT the same thing as Node's Buffer. Node's Buffer was
+ * created in 2009 before JavaScript had the concept of ArrayBuffers. It's
+ * simply a non-standard ArrayBuffer.
+ *
+ * ArrayBuffer is a fixed memory allocation. Deno.Buffer is implemented on top
+ * of ArrayBuffer.
+ *
+ * Based on [Go Buffer](https://golang.org/pkg/bytes/#Buffer). */
+ export class Buffer implements Reader, ReaderSync, Writer, WriterSync {
+ constructor(ab?: ArrayBuffer);
+ /** Returns a slice holding the unread portion of the buffer.
+ *
+ * The slice is valid for use only until the next buffer modification (that
+ * is, only until the next call to a method like `read()`, `write()`,
+ * `reset()`, or `truncate()`). If `options.copy` is false the slice aliases the buffer content at
+ * least until the next buffer modification, so immediate changes to the
+ * slice will affect the result of future reads.
+ * @param options Defaults to `{ copy: true }`
+ */
+ bytes(options?: { copy?: boolean }): Uint8Array;
+ /** Returns whether the unread portion of the buffer is empty. */
+ empty(): boolean;
+ /** A read only number of bytes of the unread portion of the buffer. */
+ readonly length: number;
+ /** The read only capacity of the buffer's underlying byte slice, that is,
+ * the total space allocated for the buffer's data. */
+ readonly capacity: number;
+ /** Discards all but the first `n` unread bytes from the buffer but
+ * continues to use the same allocated storage. It throws if `n` is
+ * negative or greater than the length of the buffer. */
+ truncate(n: number): void;
+ /** Resets the buffer to be empty, but it retains the underlying storage for
+ * use by future writes. `.reset()` is the same as `.truncate(0)`. */
+ reset(): void;
+ /** Reads the next `p.length` bytes from the buffer or until the buffer is
+ * drained. Returns the number of bytes read. If the buffer has no data to
+ * return, the return is EOF (`null`). */
+ readSync(p: Uint8Array): number | null;
+ /** Reads the next `p.length` bytes from the buffer or until the buffer is
+ * drained. Resolves to the number of bytes read. If the buffer has no
+ * data to return, resolves to EOF (`null`).
+ *
+ * NOTE: This methods reads bytes sychronously; it's provided for
+ * compatibility with `Reader` interfaces.
+ */
+ read(p: Uint8Array): Promise<number | null>;
+ writeSync(p: Uint8Array): number;
+ /** NOTE: This methods writes bytes sychronously; it's provided for
+ * compatibility with `Writer` interface. */
+ write(p: Uint8Array): Promise<number>;
+ /** Grows the buffer's capacity, if necessary, to guarantee space for
+ * another `n` bytes. After `.grow(n)`, at least `n` bytes can be written to
+ * the buffer without another allocation. If `n` is negative, `.grow()` will
+ * throw. If the buffer can't grow it will throw an error.
+ *
+ * Based on Go Lang's
+ * [Buffer.Grow](https://golang.org/pkg/bytes/#Buffer.Grow). */
+ grow(n: number): void;
+ /** Reads data from `r` until EOF (`null`) and appends it to the buffer,
+ * growing the buffer as needed. It resolves to the number of bytes read.
+ * If the buffer becomes too large, `.readFrom()` will reject with an error.
+ *
+ * Based on Go Lang's
+ * [Buffer.ReadFrom](https://golang.org/pkg/bytes/#Buffer.ReadFrom). */
+ readFrom(r: Reader): Promise<number>;
+ /** Reads data from `r` until EOF (`null`) and appends it to the buffer,
+ * growing the buffer as needed. It returns the number of bytes read. If the
+ * buffer becomes too large, `.readFromSync()` will throw an error.
+ *
+ * Based on Go Lang's
+ * [Buffer.ReadFrom](https://golang.org/pkg/bytes/#Buffer.ReadFrom). */
+ readFromSync(r: ReaderSync): number;
+ }
+
+ /** Read Reader `r` until EOF (`null`) and resolve to the content as
+ * Uint8Array`.
+ *
+ * ```ts
+ * // Example from stdin
+ * const stdinContent = await Deno.readAll(Deno.stdin);
+ *
+ * // Example from file
+ * const file = await Deno.open("my_file.txt", {read: true});
+ * const myFileContent = await Deno.readAll(file);
+ * Deno.close(file.rid);
+ *
+ * // Example from buffer
+ * const myData = new Uint8Array(100);
+ * // ... fill myData array with data
+ * const reader = new Deno.Buffer(myData.buffer as ArrayBuffer);
+ * const bufferContent = await Deno.readAll(reader);
+ * ```
+ */
+ export function readAll(r: Reader): Promise<Uint8Array>;
+
+ /** Synchronously reads Reader `r` until EOF (`null`) and returns the content
+ * as `Uint8Array`.
+ *
+ * ```ts
+ * // Example from stdin
+ * const stdinContent = Deno.readAllSync(Deno.stdin);
+ *
+ * // Example from file
+ * const file = Deno.openSync("my_file.txt", {read: true});
+ * const myFileContent = Deno.readAllSync(file);
+ * Deno.close(file.rid);
+ *
+ * // Example from buffer
+ * const myData = new Uint8Array(100);
+ * // ... fill myData array with data
+ * const reader = new Deno.Buffer(myData.buffer as ArrayBuffer);
+ * const bufferContent = Deno.readAllSync(reader);
+ * ```
+ */
+ export function readAllSync(r: ReaderSync): Uint8Array;
+
+ /** Write all the content of the array buffer (`arr`) to the writer (`w`).
+ *
+ * ```ts
+ * // Example writing to stdout
+ * const contentBytes = new TextEncoder().encode("Hello World");
+ * await Deno.writeAll(Deno.stdout, contentBytes);
+ *
+ * // Example writing to file
+ * const contentBytes = new TextEncoder().encode("Hello World");
+ * const file = await Deno.open('test.file', {write: true});
+ * await Deno.writeAll(file, contentBytes);
+ * Deno.close(file.rid);
+ *
+ * // Example writing to buffer
+ * const contentBytes = new TextEncoder().encode("Hello World");
+ * const writer = new Deno.Buffer();
+ * await Deno.writeAll(writer, contentBytes);
+ * console.log(writer.bytes().length); // 11
+ * ```
+ */
+ export function writeAll(w: Writer, arr: Uint8Array): Promise<void>;
+
+ /** Synchronously write all the content of the array buffer (`arr`) to the
+ * writer (`w`).
+ *
+ * ```ts
+ * // Example writing to stdout
+ * const contentBytes = new TextEncoder().encode("Hello World");
+ * Deno.writeAllSync(Deno.stdout, contentBytes);
+ *
+ * // Example writing to file
+ * const contentBytes = new TextEncoder().encode("Hello World");
+ * const file = Deno.openSync('test.file', {write: true});
+ * Deno.writeAllSync(file, contentBytes);
+ * Deno.close(file.rid);
+ *
+ * // Example writing to buffer
+ * const contentBytes = new TextEncoder().encode("Hello World");
+ * const writer = new Deno.Buffer();
+ * Deno.writeAllSync(writer, contentBytes);
+ * console.log(writer.bytes().length); // 11
+ * ```
+ */
+ export function writeAllSync(w: WriterSync, arr: Uint8Array): void;
+
+ export interface MkdirOptions {
+ /** Defaults to `false`. If set to `true`, means that any intermediate
+ * directories will also be created (as with the shell command `mkdir -p`).
+ * Intermediate directories are created with the same permissions.
+ * When recursive is set to `true`, succeeds silently (without changing any
+ * permissions) if a directory already exists at the path, or if the path
+ * is a symlink to an existing directory. */
+ recursive?: boolean;
+ /** Permissions to use when creating the directory (defaults to `0o777`,
+ * before the process's umask).
+ * Ignored on Windows. */
+ mode?: number;
+ }
+
+ /** Synchronously creates a new directory with the specified path.
+ *
+ * ```ts
+ * Deno.mkdirSync("new_dir");
+ * Deno.mkdirSync("nested/directories", { recursive: true });
+ * Deno.mkdirSync("restricted_access_dir", { mode: 0o700 });
+ * ```
+ *
+ * Defaults to throwing error if the directory already exists.
+ *
+ * Requires `allow-write` permission. */
+ export function mkdirSync(path: string | URL, options?: MkdirOptions): void;
+
+ /** Creates a new directory with the specified path.
+ *
+ * ```ts
+ * await Deno.mkdir("new_dir");
+ * await Deno.mkdir("nested/directories", { recursive: true });
+ * await Deno.mkdir("restricted_access_dir", { mode: 0o700 });
+ * ```
+ *
+ * Defaults to throwing error if the directory already exists.
+ *
+ * Requires `allow-write` permission. */
+ export function mkdir(
+ path: string | URL,
+ options?: MkdirOptions,
+ ): Promise<void>;
+
+ export interface MakeTempOptions {
+ /** Directory where the temporary directory should be created (defaults to
+ * the env variable TMPDIR, or the system's default, usually /tmp).
+ *
+ * Note that if the passed `dir` is relative, the path returned by
+ * makeTempFile() and makeTempDir() will also be relative. Be mindful of
+ * this when changing working directory. */
+ dir?: string;
+ /** String that should precede the random portion of the temporary
+ * directory's name. */
+ prefix?: string;
+ /** String that should follow the random portion of the temporary
+ * directory's name. */
+ suffix?: string;
+ }
+
+ /** Synchronously creates a new temporary directory in the default directory
+ * for temporary files (see also `Deno.dir("temp")`), unless `dir` is specified.
+ * Other optional options include prefixing and suffixing the directory name
+ * with `prefix` and `suffix` respectively.
+ *
+ * The full path to the newly created directory is returned.
+ *
+ * Multiple programs calling this function simultaneously will create different
+ * directories. It is the caller's responsibility to remove the directory when
+ * no longer needed.
+ *
+ * ```ts
+ * const tempDirName0 = Deno.makeTempDirSync(); // e.g. /tmp/2894ea76
+ * const tempDirName1 = Deno.makeTempDirSync({ prefix: 'my_temp' }); // e.g. /tmp/my_temp339c944d
+ * ```
+ *
+ * Requires `allow-write` permission. */
+ // TODO(ry) Doesn't check permissions.
+ export function makeTempDirSync(options?: MakeTempOptions): string;
+
+ /** Creates a new temporary directory in the default directory for temporary
+ * files (see also `Deno.dir("temp")`), unless `dir` is specified. Other
+ * optional options include prefixing and suffixing the directory name with
+ * `prefix` and `suffix` respectively.
+ *
+ * This call resolves to the full path to the newly created directory.
+ *
+ * Multiple programs calling this function simultaneously will create different
+ * directories. It is the caller's responsibility to remove the directory when
+ * no longer needed.
+ *
+ * ```ts
+ * const tempDirName0 = await Deno.makeTempDir(); // e.g. /tmp/2894ea76
+ * const tempDirName1 = await Deno.makeTempDir({ prefix: 'my_temp' }); // e.g. /tmp/my_temp339c944d
+ * ```
+ *
+ * Requires `allow-write` permission. */
+ // TODO(ry) Doesn't check permissions.
+ export function makeTempDir(options?: MakeTempOptions): Promise<string>;
+
+ /** Synchronously creates a new temporary file in the default directory for
+ * temporary files (see also `Deno.dir("temp")`), unless `dir` is specified.
+ * Other optional options include prefixing and suffixing the directory name
+ * with `prefix` and `suffix` respectively.
+ *
+ * The full path to the newly created file is returned.
+ *
+ * Multiple programs calling this function simultaneously will create different
+ * files. It is the caller's responsibility to remove the file when no longer
+ * needed.
+ *
+ * ```ts
+ * const tempFileName0 = Deno.makeTempFileSync(); // e.g. /tmp/419e0bf2
+ * const tempFileName1 = Deno.makeTempFileSync({ prefix: 'my_temp' }); // e.g. /tmp/my_temp754d3098
+ * ```
+ *
+ * Requires `allow-write` permission. */
+ export function makeTempFileSync(options?: MakeTempOptions): string;
+
+ /** Creates a new temporary file in the default directory for temporary
+ * files (see also `Deno.dir("temp")`), unless `dir` is specified. Other
+ * optional options include prefixing and suffixing the directory name with
+ * `prefix` and `suffix` respectively.
+ *
+ * This call resolves to the full path to the newly created file.
+ *
+ * Multiple programs calling this function simultaneously will create different
+ * files. It is the caller's responsibility to remove the file when no longer
+ * needed.
+ *
+ * ```ts
+ * const tmpFileName0 = await Deno.makeTempFile(); // e.g. /tmp/419e0bf2
+ * const tmpFileName1 = await Deno.makeTempFile({ prefix: 'my_temp' }); // e.g. /tmp/my_temp754d3098
+ * ```
+ *
+ * Requires `allow-write` permission. */
+ export function makeTempFile(options?: MakeTempOptions): Promise<string>;
+
+ /** Synchronously changes the permission of a specific file/directory of
+ * specified path. Ignores the process's umask.
+ *
+ * ```ts
+ * Deno.chmodSync("/path/to/file", 0o666);
+ * ```
+ *
+ * For a full description, see [chmod](#chmod)
+ *
+ * NOTE: This API currently throws on Windows
+ *
+ * Requires `allow-write` permission. */
+ export function chmodSync(path: string | URL, mode: number): void;
+
+ /** Changes the permission of a specific file/directory of specified path.
+ * Ignores the process's umask.
+ *
+ * ```ts
+ * await Deno.chmod("/path/to/file", 0o666);
+ * ```
+ *
+ * The mode is a sequence of 3 octal numbers. The first/left-most number
+ * specifies the permissions for the owner. The second number specifies the
+ * permissions for the group. The last/right-most number specifies the
+ * permissions for others. For example, with a mode of 0o764, the owner (7) can
+ * read/write/execute, the group (6) can read/write and everyone else (4) can
+ * read only.
+ *
+ * | Number | Description |
+ * | ------ | ----------- |
+ * | 7 | read, write, and execute |
+ * | 6 | read and write |
+ * | 5 | read and execute |
+ * | 4 | read only |
+ * | 3 | write and execute |
+ * | 2 | write only |
+ * | 1 | execute only |
+ * | 0 | no permission |
+ *
+ * NOTE: This API currently throws on Windows
+ *
+ * Requires `allow-write` permission. */
+ export function chmod(path: string | URL, mode: number): Promise<void>;
+
+ /** Synchronously change owner of a regular file or directory. This functionality
+ * is not available on Windows.
+ *
+ * ```ts
+ * Deno.chownSync("myFile.txt", 1000, 1002);
+ * ```
+ *
+ * Requires `allow-write` permission.
+ *
+ * Throws Error (not implemented) if executed on Windows
+ *
+ * @param path path to the file
+ * @param uid user id (UID) of the new owner, or `null` for no change
+ * @param gid group id (GID) of the new owner, or `null` for no change
+ */
+ export function chownSync(
+ path: string | URL,
+ uid: number | null,
+ gid: number | null,
+ ): void;
+
+ /** Change owner of a regular file or directory. This functionality
+ * is not available on Windows.
+ *
+ * ```ts
+ * await Deno.chown("myFile.txt", 1000, 1002);
+ * ```
+ *
+ * Requires `allow-write` permission.
+ *
+ * Throws Error (not implemented) if executed on Windows
+ *
+ * @param path path to the file
+ * @param uid user id (UID) of the new owner, or `null` for no change
+ * @param gid group id (GID) of the new owner, or `null` for no change
+ */
+ export function chown(
+ path: string | URL,
+ uid: number | null,
+ gid: number | null,
+ ): Promise<void>;
+
+ export interface RemoveOptions {
+ /** Defaults to `false`. If set to `true`, path will be removed even if
+ * it's a non-empty directory. */
+ recursive?: boolean;
+ }
+
+ /** Synchronously removes the named file or directory.
+ *
+ * ```ts
+ * Deno.removeSync("/path/to/empty_dir/or/file");
+ * Deno.removeSync("/path/to/populated_dir/or/file", { recursive: true });
+ * ```
+ *
+ * Throws error if permission denied, path not found, or path is a non-empty
+ * directory and the `recursive` option isn't set to `true`.
+ *
+ * Requires `allow-write` permission. */
+ export function removeSync(path: string | URL, options?: RemoveOptions): void;
+
+ /** Removes the named file or directory.
+ *
+ * ```ts
+ * await Deno.remove("/path/to/empty_dir/or/file");
+ * await Deno.remove("/path/to/populated_dir/or/file", { recursive: true });
+ * ```
+ *
+ * Throws error if permission denied, path not found, or path is a non-empty
+ * directory and the `recursive` option isn't set to `true`.
+ *
+ * Requires `allow-write` permission. */
+ export function remove(
+ path: string | URL,
+ options?: RemoveOptions,
+ ): Promise<void>;
+
+ /** Synchronously renames (moves) `oldpath` to `newpath`. Paths may be files or
+ * directories. If `newpath` already exists and is not a directory,
+ * `renameSync()` replaces it. OS-specific restrictions may apply when
+ * `oldpath` and `newpath` are in different directories.
+ *
+ * ```ts
+ * Deno.renameSync("old/path", "new/path");
+ * ```
+ *
+ * On Unix, this operation does not follow symlinks at either path.
+ *
+ * It varies between platforms when the operation throws errors, and if so what
+ * they are. It's always an error to rename anything to a non-empty directory.
+ *
+ * Requires `allow-read` and `allow-write` permissions. */
+ export function renameSync(oldpath: string, newpath: string): void;
+
+ /** Renames (moves) `oldpath` to `newpath`. Paths may be files or directories.
+ * If `newpath` already exists and is not a directory, `rename()` replaces it.
+ * OS-specific restrictions may apply when `oldpath` and `newpath` are in
+ * different directories.
+ *
+ * ```ts
+ * await Deno.rename("old/path", "new/path");
+ * ```
+ *
+ * On Unix, this operation does not follow symlinks at either path.
+ *
+ * It varies between platforms when the operation throws errors, and if so what
+ * they are. It's always an error to rename anything to a non-empty directory.
+ *
+ * Requires `allow-read` and `allow-write` permission. */
+ export function rename(oldpath: string, newpath: string): Promise<void>;
+
+ /** Synchronously reads and returns the entire contents of a file as utf8 encoded string
+ * encoded string. Reading a directory returns an empty string.
+ *
+ * ```ts
+ * const data = Deno.readTextFileSync("hello.txt");
+ * console.log(data);
+ * ```
+ *
+ * Requires `allow-read` permission. */
+ export function readTextFileSync(path: string | URL): string;
+
+ /** Asynchronously reads and returns the entire contents of a file as a utf8
+ * encoded string. Reading a directory returns an empty data array.
+ *
+ * ```ts
+ * const data = await Deno.readTextFile("hello.txt");
+ * console.log(data);
+ * ```
+ *
+ * Requires `allow-read` permission. */
+ export function readTextFile(path: string | URL): Promise<string>;
+
+ /** Synchronously reads and returns the entire contents of a file as an array
+ * of bytes. `TextDecoder` can be used to transform the bytes to string if
+ * required. Reading a directory returns an empty data array.
+ *
+ * ```ts
+ * const decoder = new TextDecoder("utf-8");
+ * const data = Deno.readFileSync("hello.txt");
+ * console.log(decoder.decode(data));
+ * ```
+ *
+ * Requires `allow-read` permission. */
+ export function readFileSync(path: string | URL): Uint8Array;
+
+ /** Reads and resolves to the entire contents of a file as an array of bytes.
+ * `TextDecoder` can be used to transform the bytes to string if required.
+ * Reading a directory returns an empty data array.
+ *
+ * ```ts
+ * const decoder = new TextDecoder("utf-8");
+ * const data = await Deno.readFile("hello.txt");
+ * console.log(decoder.decode(data));
+ * ```
+ *
+ * Requires `allow-read` permission. */
+ export function readFile(path: string | URL): Promise<Uint8Array>;
+
+ /** A FileInfo describes a file and is returned by `stat`, `lstat`,
+ * `statSync`, `lstatSync`. */
+ export interface FileInfo {
+ /** True if this is info for a regular file. Mutually exclusive to
+ * `FileInfo.isDirectory` and `FileInfo.isSymlink`. */
+ isFile: boolean;
+ /** True if this is info for a regular directory. Mutually exclusive to
+ * `FileInfo.isFile` and `FileInfo.isSymlink`. */
+ isDirectory: boolean;
+ /** True if this is info for a symlink. Mutually exclusive to
+ * `FileInfo.isFile` and `FileInfo.isDirectory`. */
+ isSymlink: boolean;
+ /** The size of the file, in bytes. */
+ size: number;
+ /** The last modification time of the file. This corresponds to the `mtime`
+ * field from `stat` on Linux/Mac OS and `ftLastWriteTime` on Windows. This
+ * may not be available on all platforms. */
+ mtime: Date | null;
+ /** The last access time of the file. This corresponds to the `atime`
+ * field from `stat` on Unix and `ftLastAccessTime` on Windows. This may not
+ * be available on all platforms. */
+ atime: Date | null;
+ /** The creation time of the file. This corresponds to the `birthtime`
+ * field from `stat` on Mac/BSD and `ftCreationTime` on Windows. This may
+ * not be available on all platforms. */
+ birthtime: Date | null;
+ /** ID of the device containing the file.
+ *
+ * _Linux/Mac OS only._ */
+ dev: number | null;
+ /** Inode number.
+ *
+ * _Linux/Mac OS only._ */
+ ino: number | null;
+ /** **UNSTABLE**: Match behavior with Go on Windows for `mode`.
+ *
+ * The underlying raw `st_mode` bits that contain the standard Unix
+ * permissions for this file/directory. */
+ mode: number | null;
+ /** Number of hard links pointing to this file.
+ *
+ * _Linux/Mac OS only._ */
+ nlink: number | null;
+ /** User ID of the owner of this file.
+ *
+ * _Linux/Mac OS only._ */
+ uid: number | null;
+ /** Group ID of the owner of this file.
+ *
+ * _Linux/Mac OS only._ */
+ gid: number | null;
+ /** Device ID of this file.
+ *
+ * _Linux/Mac OS only._ */
+ rdev: number | null;
+ /** Blocksize for filesystem I/O.
+ *
+ * _Linux/Mac OS only._ */
+ blksize: number | null;
+ /** Number of blocks allocated to the file, in 512-byte units.
+ *
+ * _Linux/Mac OS only._ */
+ blocks: number | null;
+ }
+
+ /** Returns absolute normalized path, with symbolic links resolved.
+ *
+ * ```ts
+ * // e.g. given /home/alice/file.txt and current directory /home/alice
+ * Deno.symlinkSync("file.txt", "symlink_file.txt");
+ * const realPath = Deno.realPathSync("./file.txt");
+ * const realSymLinkPath = Deno.realPathSync("./symlink_file.txt");
+ * console.log(realPath); // outputs "/home/alice/file.txt"
+ * console.log(realSymLinkPath); // outputs "/home/alice/file.txt"
+ * ```
+ *
+ * Requires `allow-read` permission for the target path.
+ * Also requires `allow-read` permission for the CWD if the target path is
+ * relative.*/
+ export function realPathSync(path: string): string;
+
+ /** Resolves to the absolute normalized path, with symbolic links resolved.
+ *
+ * ```ts
+ * // e.g. given /home/alice/file.txt and current directory /home/alice
+ * await Deno.symlink("file.txt", "symlink_file.txt");
+ * const realPath = await Deno.realPath("./file.txt");
+ * const realSymLinkPath = await Deno.realPath("./symlink_file.txt");
+ * console.log(realPath); // outputs "/home/alice/file.txt"
+ * console.log(realSymLinkPath); // outputs "/home/alice/file.txt"
+ * ```
+ *
+ * Requires `allow-read` permission for the target path.
+ * Also requires `allow-read` permission for the CWD if the target path is
+ * relative.*/
+ export function realPath(path: string): Promise<string>;
+
+ export interface DirEntry {
+ name: string;
+ isFile: boolean;
+ isDirectory: boolean;
+ isSymlink: boolean;
+ }
+
+ /** Synchronously reads the directory given by `path` and returns an iterable
+ * of `Deno.DirEntry`.
+ *
+ * ```ts
+ * for (const dirEntry of Deno.readDirSync("/")) {
+ * console.log(dirEntry.name);
+ * }
+ * ```
+ *
+ * Throws error if `path` is not a directory.
+ *
+ * Requires `allow-read` permission. */
+ export function readDirSync(path: string | URL): Iterable<DirEntry>;
+
+ /** Reads the directory given by `path` and returns an async iterable of
+ * `Deno.DirEntry`.
+ *
+ * ```ts
+ * for await (const dirEntry of Deno.readDir("/")) {
+ * console.log(dirEntry.name);
+ * }
+ * ```
+ *
+ * Throws error if `path` is not a directory.
+ *
+ * Requires `allow-read` permission. */
+ export function readDir(path: string | URL): AsyncIterable<DirEntry>;
+
+ /** Synchronously copies the contents and permissions of one file to another
+ * specified path, by default creating a new file if needed, else overwriting.
+ * Fails if target path is a directory or is unwritable.
+ *
+ * ```ts
+ * Deno.copyFileSync("from.txt", "to.txt");
+ * ```
+ *
+ * Requires `allow-read` permission on fromPath.
+ * Requires `allow-write` permission on toPath. */
+ export function copyFileSync(
+ fromPath: string | URL,
+ toPath: string | URL,
+ ): void;
+
+ /** Copies the contents and permissions of one file to another specified path,
+ * by default creating a new file if needed, else overwriting. Fails if target
+ * path is a directory or is unwritable.
+ *
+ * ```ts
+ * await Deno.copyFile("from.txt", "to.txt");
+ * ```
+ *
+ * Requires `allow-read` permission on fromPath.
+ * Requires `allow-write` permission on toPath. */
+ export function copyFile(
+ fromPath: string | URL,
+ toPath: string | URL,
+ ): Promise<void>;
+
+ /** Returns the full path destination of the named symbolic link.
+ *
+ * ```ts
+ * Deno.symlinkSync("./test.txt", "./test_link.txt");
+ * const target = Deno.readLinkSync("./test_link.txt"); // full path of ./test.txt
+ * ```
+ *
+ * Throws TypeError if called with a hard link
+ *
+ * Requires `allow-read` permission. */
+ export function readLinkSync(path: string): string;
+
+ /** Resolves to the full path destination of the named symbolic link.
+ *
+ * ```ts
+ * await Deno.symlink("./test.txt", "./test_link.txt");
+ * const target = await Deno.readLink("./test_link.txt"); // full path of ./test.txt
+ * ```
+ *
+ * Throws TypeError if called with a hard link
+ *
+ * Requires `allow-read` permission. */
+ export function readLink(path: string): Promise<string>;
+
+ /** Resolves to a `Deno.FileInfo` for the specified `path`. If `path` is a
+ * symlink, information for the symlink will be returned instead of what it
+ * points to.
+ *
+ * ```ts
+ * import { assert } from "https://deno.land/std/testing/asserts.ts";
+ * const fileInfo = await Deno.lstat("hello.txt");
+ * assert(fileInfo.isFile);
+ * ```
+ *
+ * Requires `allow-read` permission. */
+ export function lstat(path: string | URL): Promise<FileInfo>;
+
+ /** Synchronously returns a `Deno.FileInfo` for the specified `path`. If
+ * `path` is a symlink, information for the symlink will be returned instead of
+ * what it points to..
+ *
+ * ```ts
+ * const fileInfo = Deno.lstatSync("hello.txt");
+ * assert(fileInfo.isFile);
+ * ```
+ *
+ * Requires `allow-read` permission. */
+ export function lstatSync(path: string | URL): FileInfo;
+
+ /** Resolves to a `Deno.FileInfo` for the specified `path`. Will always
+ * follow symlinks.
+ *
+ * ```ts
+ * import { assert } from "https://deno.land/std/testing/asserts.ts";
+ * const fileInfo = await Deno.stat("hello.txt");
+ * assert(fileInfo.isFile);
+ * ```
+ *
+ * Requires `allow-read` permission. */
+ export function stat(path: string | URL): Promise<FileInfo>;
+
+ /** Synchronously returns a `Deno.FileInfo` for the specified `path`. Will
+ * always follow symlinks.
+ *
+ * ```ts
+ * import { assert } from "https://deno.land/std/testing/asserts.ts";
+ * const fileInfo = Deno.statSync("hello.txt");
+ * assert(fileInfo.isFile);
+ * ```
+ *
+ * Requires `allow-read` permission. */
+ export function statSync(path: string | URL): FileInfo;
+
+ /** Options for writing to a file. */
+ export interface WriteFileOptions {
+ /** Defaults to `false`. If set to `true`, will append to a file instead of
+ * overwriting previous contents. */
+ append?: boolean;
+ /** Sets the option to allow creating a new file, if one doesn't already
+ * exist at the specified path (defaults to `true`). */
+ create?: boolean;
+ /** Permissions always applied to file. */
+ mode?: number;
+ }
+
+ /** Synchronously write `data` to the given `path`, by default creating a new
+ * file if needed, else overwriting.
+ *
+ * ```ts
+ * const encoder = new TextEncoder();
+ * const data = encoder.encode("Hello world\n");
+ * Deno.writeFileSync("hello1.txt", data); // overwrite "hello1.txt" or create it
+ * Deno.writeFileSync("hello2.txt", data, {create: false}); // only works if "hello2.txt" exists
+ * Deno.writeFileSync("hello3.txt", data, {mode: 0o777}); // set permissions on new file
+ * Deno.writeFileSync("hello4.txt", data, {append: true}); // add data to the end of the file
+ * ```
+ *
+ * Requires `allow-write` permission, and `allow-read` if `options.create` is
+ * `false`.
+ */
+ export function writeFileSync(
+ path: string | URL,
+ data: Uint8Array,
+ options?: WriteFileOptions,
+ ): void;
+
+ /** Write `data` to the given `path`, by default creating a new file if needed,
+ * else overwriting.
+ *
+ * ```ts
+ * const encoder = new TextEncoder();
+ * const data = encoder.encode("Hello world\n");
+ * await Deno.writeFile("hello1.txt", data); // overwrite "hello1.txt" or create it
+ * await Deno.writeFile("hello2.txt", data, {create: false}); // only works if "hello2.txt" exists
+ * await Deno.writeFile("hello3.txt", data, {mode: 0o777}); // set permissions on new file
+ * await Deno.writeFile("hello4.txt", data, {append: true}); // add data to the end of the file
+ * ```
+ *
+ * Requires `allow-write` permission, and `allow-read` if `options.create` is `false`.
+ */
+ export function writeFile(
+ path: string | URL,
+ data: Uint8Array,
+ options?: WriteFileOptions,
+ ): Promise<void>;
+
+ /** Synchronously write string `data` to the given `path`, by default creating a new file if needed,
+ * else overwriting.
+ *
+ * ```ts
+ * await Deno.writeTextFileSync("hello1.txt", "Hello world\n"); // overwrite "hello1.txt" or create it
+ * ```
+ *
+ * Requires `allow-write` permission, and `allow-read` if `options.create` is `false`.
+ */
+ export function writeTextFileSync(
+ path: string | URL,
+ data: string,
+ options?: WriteFileOptions,
+ ): void;
+
+ /** Asynchronously write string `data` to the given `path`, by default creating a new file if needed,
+ * else overwriting.
+ *
+ * ```ts
+ * await Deno.writeTextFile("hello1.txt", "Hello world\n"); // overwrite "hello1.txt" or create it
+ * ```
+ *
+ * Requires `allow-write` permission, and `allow-read` if `options.create` is `false`.
+ */
+ export function writeTextFile(
+ path: string | URL,
+ data: string,
+ options?: WriteFileOptions,
+ ): Promise<void>;
+
+ /** Synchronously truncates or extends the specified file, to reach the
+ * specified `len`. If `len` is not specified then the entire file contents
+ * are truncated.
+ *
+ * ```ts
+ * // truncate the entire file
+ * Deno.truncateSync("my_file.txt");
+ *
+ * // truncate part of the file
+ * const file = Deno.makeTempFileSync();
+ * Deno.writeFileSync(file, new TextEncoder().encode("Hello World"));
+ * Deno.truncateSync(file, 7);
+ * const data = Deno.readFileSync(file);
+ * console.log(new TextDecoder().decode(data));
+ * ```
+ *
+ * Requires `allow-write` permission. */
+ export function truncateSync(name: string, len?: number): void;
+
+ /** Truncates or extends the specified file, to reach the specified `len`. If
+ * `len` is not specified then the entire file contents are truncated.
+ *
+ * ```ts
+ * // truncate the entire file
+ * await Deno.truncate("my_file.txt");
+ *
+ * // truncate part of the file
+ * const file = await Deno.makeTempFile();
+ * await Deno.writeFile(file, new TextEncoder().encode("Hello World"));
+ * await Deno.truncate(file, 7);
+ * const data = await Deno.readFile(file);
+ * console.log(new TextDecoder().decode(data)); // "Hello W"
+ * ```
+ *
+ * Requires `allow-write` permission. */
+ export function truncate(name: string, len?: number): Promise<void>;
+
+ export interface NetAddr {
+ transport: "tcp" | "udp";
+ hostname: string;
+ port: number;
+ }
+
+ export interface UnixAddr {
+ transport: "unix" | "unixpacket";
+ path: string;
+ }
+
+ export type Addr = NetAddr | UnixAddr;
+
+ /** A generic network listener for stream-oriented protocols. */
+ export interface Listener extends AsyncIterable<Conn> {
+ /** Waits for and resolves to the next connection to the `Listener`. */
+ accept(): Promise<Conn>;
+ /** Close closes the listener. Any pending accept promises will be rejected
+ * with errors. */
+ close(): void;
+ /** Return the address of the `Listener`. */
+ readonly addr: Addr;
+
+ /** Return the rid of the `Listener`. */
+ readonly rid: number;
+
+ [Symbol.asyncIterator](): AsyncIterableIterator<Conn>;
+ }
+
+ export interface Conn extends Reader, Writer, Closer {
+ /** The local address of the connection. */
+ readonly localAddr: Addr;
+ /** The remote address of the connection. */
+ readonly remoteAddr: Addr;
+ /** The resource ID of the connection. */
+ readonly rid: number;
+ /** Shuts down (`shutdown(2)`) the writing side of the TCP connection. Most
+ * callers should just use `close()`.
+ *
+ * **Unstable** because of lack of testing and because Deno.shutdown is also
+ * unstable.
+ * */
+ closeWrite(): void;
+ }
+
+ export interface ListenOptions {
+ /** The port to listen on. */
+ port: number;
+ /** A literal IP address or host name that can be resolved to an IP address.
+ * If not specified, defaults to `0.0.0.0`. */
+ hostname?: string;
+ }
+
+ /** Listen announces on the local transport address.
+ *
+ * ```ts
+ * const listener1 = Deno.listen({ port: 80 })
+ * const listener2 = Deno.listen({ hostname: "192.0.2.1", port: 80 })
+ * const listener3 = Deno.listen({ hostname: "[2001:db8::1]", port: 80 });
+ * const listener4 = Deno.listen({ hostname: "golang.org", port: 80, transport: "tcp" });
+ * ```
+ *
+ * Requires `allow-net` permission. */
+ export function listen(
+ options: ListenOptions & { transport?: "tcp" },
+ ): Listener;
+
+ export interface ListenTlsOptions extends ListenOptions {
+ /** Server certificate file. */
+ certFile: string;
+ /** Server public key file. */
+ keyFile: string;
+
+ transport?: "tcp";
+ }
+
+ /** Listen announces on the local transport address over TLS (transport layer
+ * security).
+ *
+ * ```ts
+ * const lstnr = Deno.listenTls({ port: 443, certFile: "./server.crt", keyFile: "./server.key" });
+ * ```
+ *
+ * Requires `allow-net` permission. */
+ export function listenTls(options: ListenTlsOptions): Listener;
+
+ export interface ConnectOptions {
+ /** The port to connect to. */
+ port: number;
+ /** A literal IP address or host name that can be resolved to an IP address.
+ * If not specified, defaults to `127.0.0.1`. */
+ hostname?: string;
+ transport?: "tcp";
+ }
+
+ /**
+ * Connects to the hostname (default is "127.0.0.1") and port on the named
+ * transport (default is "tcp"), and resolves to the connection (`Conn`).
+ *
+ * ```ts
+ * const conn1 = await Deno.connect({ port: 80 });
+ * const conn2 = await Deno.connect({ hostname: "192.0.2.1", port: 80 });
+ * const conn3 = await Deno.connect({ hostname: "[2001:db8::1]", port: 80 });
+ * const conn4 = await Deno.connect({ hostname: "golang.org", port: 80, transport: "tcp" });
+ * ```
+ *
+ * Requires `allow-net` permission for "tcp". */
+ export function connect(options: ConnectOptions): Promise<Conn>;
+
+ export interface ConnectTlsOptions {
+ /** The port to connect to. */
+ port: number;
+ /** A literal IP address or host name that can be resolved to an IP address.
+ * If not specified, defaults to `127.0.0.1`. */
+ hostname?: string;
+ /** Server certificate file. */
+ certFile?: string;
+ }
+
+ /** Establishes a secure connection over TLS (transport layer security) using
+ * an optional cert file, hostname (default is "127.0.0.1") and port. The
+ * cert file is optional and if not included Mozilla's root certificates will
+ * be used (see also https://github.com/ctz/webpki-roots for specifics)
+ *
+ * ```ts
+ * const conn1 = await Deno.connectTls({ port: 80 });
+ * const conn2 = await Deno.connectTls({ certFile: "./certs/my_custom_root_CA.pem", hostname: "192.0.2.1", port: 80 });
+ * const conn3 = await Deno.connectTls({ hostname: "[2001:db8::1]", port: 80 });
+ * const conn4 = await Deno.connectTls({ certFile: "./certs/my_custom_root_CA.pem", hostname: "golang.org", port: 80});
+ * ```
+ *
+ * Requires `allow-net` permission.
+ */
+ export function connectTls(options: ConnectTlsOptions): Promise<Conn>;
+
+ export interface Metrics {
+ opsDispatched: number;
+ opsDispatchedSync: number;
+ opsDispatchedAsync: number;
+ opsDispatchedAsyncUnref: number;
+ opsCompleted: number;
+ opsCompletedSync: number;
+ opsCompletedAsync: number;
+ opsCompletedAsyncUnref: number;
+ bytesSentControl: number;
+ bytesSentData: number;
+ bytesReceived: number;
+ }
+
+ /** Receive metrics from the privileged side of Deno. This is primarily used
+ * in the development of Deno. 'Ops', also called 'bindings', are the go-between
+ * between Deno JavaScript and Deno Rust.
+ *
+ * > console.table(Deno.metrics())
+ * ┌─────────────────────────┬────────┐
+ * │ (index) │ Values │
+ * ├─────────────────────────┼────────┤
+ * │ opsDispatched │ 3 │
+ * │ opsDispatchedSync │ 2 │
+ * │ opsDispatchedAsync │ 1 │
+ * │ opsDispatchedAsyncUnref │ 0 │
+ * │ opsCompleted │ 3 │
+ * │ opsCompletedSync │ 2 │
+ * │ opsCompletedAsync │ 1 │
+ * │ opsCompletedAsyncUnref │ 0 │
+ * │ bytesSentControl │ 73 │
+ * │ bytesSentData │ 0 │
+ * │ bytesReceived │ 375 │
+ * └─────────────────────────┴────────┘
+ */
+ export function metrics(): Metrics;
+
+ interface ResourceMap {
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ [rid: number]: any;
+ }
+
+ /** Returns a map of open resource ids (rid) along with their string
+ * representations. This is an internal API and as such resource
+ * representation has `any` type; that means it can change any time.
+ *
+ * ```ts
+ * console.log(Deno.resources());
+ * // { 0: "stdin", 1: "stdout", 2: "stderr" }
+ * Deno.openSync('../test.file');
+ * console.log(Deno.resources());
+ * // { 0: "stdin", 1: "stdout", 2: "stderr", 3: "fsFile" }
+ * ```
+ */
+ export function resources(): ResourceMap;
+
+ export interface FsEvent {
+ kind: "any" | "access" | "create" | "modify" | "remove";
+ paths: string[];
+ }
+
+ /** Watch for file system events against one or more `paths`, which can be files
+ * or directories. These paths must exist already. One user action (e.g.
+ * `touch test.file`) can generate multiple file system events. Likewise,
+ * one user action can result in multiple file paths in one event (e.g. `mv
+ * old_name.txt new_name.txt`). Recursive option is `true` by default and,
+ * for directories, will watch the specified directory and all sub directories.
+ * Note that the exact ordering of the events can vary between operating systems.
+ *
+ * ```ts
+ * const watcher = Deno.watchFs("/");
+ * for await (const event of watcher) {
+ * console.log(">>>> event", event);
+ * // { kind: "create", paths: [ "/foo.txt" ] }
+ * }
+ *```
+ *
+ * Requires `allow-read` permission.
+ */
+ export function watchFs(
+ paths: string | string[],
+ options?: { recursive: boolean },
+ ): AsyncIterableIterator<FsEvent>;
+
+ export class Process<T extends RunOptions = RunOptions> {
+ readonly rid: number;
+ readonly pid: number;
+ readonly stdin: T["stdin"] extends "piped" ? Writer & Closer
+ : (Writer & Closer) | null;
+ readonly stdout: T["stdout"] extends "piped" ? Reader & Closer
+ : (Reader & Closer) | null;
+ readonly stderr: T["stderr"] extends "piped" ? Reader & Closer
+ : (Reader & Closer) | null;
+ /** Resolves to the current status of the process. */
+ status(): Promise<ProcessStatus>;
+ /** Buffer the stdout until EOF and return it as `Uint8Array`.
+ *
+ * You must set stdout to `"piped"` when creating the process.
+ *
+ * This calls `close()` on stdout after its done. */
+ output(): Promise<Uint8Array>;
+ /** Buffer the stderr until EOF and return it as `Uint8Array`.
+ *
+ * You must set stderr to `"piped"` when creating the process.
+ *
+ * This calls `close()` on stderr after its done. */
+ stderrOutput(): Promise<Uint8Array>;
+ close(): void;
+
+ /** **UNSTABLE**: The `signo` argument may change to require the Deno.Signal
+ * enum.
+ *
+ * Send a signal to process. This functionality currently only works on
+ * Linux and Mac OS.
+ */
+ kill(signo: number): void;
+ }
+
+ export type ProcessStatus =
+ | {
+ success: true;
+ code: 0;
+ signal?: undefined;
+ }
+ | {
+ success: false;
+ code: number;
+ signal?: number;
+ };
+
+ export interface RunOptions {
+ /** Arguments to pass. Note, the first element needs to be a path to the
+ * binary */
+ cmd: string[];
+ cwd?: string;
+ env?: {
+ [key: string]: string;
+ };
+ stdout?: "inherit" | "piped" | "null" | number;
+ stderr?: "inherit" | "piped" | "null" | number;
+ stdin?: "inherit" | "piped" | "null" | number;
+ }
+
+ /** Spawns new subprocess. RunOptions must contain at a minimum the `opt.cmd`,
+ * an array of program arguments, the first of which is the binary.
+ *
+ * ```ts
+ * const p = Deno.run({
+ * cmd: ["echo", "hello"],
+ * });
+ * ```
+ *
+ * Subprocess uses same working directory as parent process unless `opt.cwd`
+ * is specified.
+ *
+ * Environmental variables for subprocess can be specified using `opt.env`
+ * mapping.
+ *
+ * By default subprocess inherits stdio of parent process. To change that
+ * `opt.stdout`, `opt.stderr` and `opt.stdin` can be specified independently -
+ * they can be set to either an rid of open file or set to "inherit" "piped"
+ * or "null":
+ *
+ * `"inherit"` The default if unspecified. The child inherits from the
+ * corresponding parent descriptor.
+ *
+ * `"piped"` A new pipe should be arranged to connect the parent and child
+ * sub-processes.
+ *
+ * `"null"` This stream will be ignored. This is the equivalent of attaching
+ * the stream to `/dev/null`.
+ *
+ * Details of the spawned process are returned.
+ *
+ * Requires `allow-run` permission. */
+ export function run<T extends RunOptions = RunOptions>(opt: T): Process<T>;
+
+ export interface InspectOptions {
+ /** Traversal depth for nested objects. Defaults to 4. */
+ depth?: number;
+ /** Sort Object, Set and Map entries by key. Defaults to false. */
+ sorted?: boolean;
+ /** Add a trailing comma for multiline collections. Defaults to false. */
+ trailingComma?: boolean;
+ /** Try to fit more than one entry of a collection on the same line.
+ * Defaults to true. */
+ compact?: boolean;
+ /** The maximum number of iterable entries to print. Defaults to 100. */
+ iterableLimit?: number;
+ }
+
+ /** Converts the input into a string that has the same format as printed by
+ * `console.log()`.
+ *
+ * ```ts
+ * const obj = {};
+ * obj.propA = 10;
+ * obj.propB = "hello";
+ * const objAsString = Deno.inspect(obj); // { propA: 10, propB: "hello" }
+ * console.log(obj); // prints same value as objAsString, e.g. { propA: 10, propB: "hello" }
+ * ```
+ *
+ * You can also register custom inspect functions, via the `customInspect` Deno
+ * symbol on objects, to control and customize the output.
+ *
+ * ```ts
+ * class A {
+ * x = 10;
+ * y = "hello";
+ * [Deno.customInspect](): string {
+ * return "x=" + this.x + ", y=" + this.y;
+ * }
+ * }
+ * ```
+ *
+ * const inStringFormat = Deno.inspect(new A()); // "x=10, y=hello"
+ * console.log(inStringFormat); // prints "x=10, y=hello"
+ *
+ * Finally, you can also specify the depth to which it will format.
+ *
+ * Deno.inspect({a: {b: {c: {d: 'hello'}}}}, {depth: 2}); // { a: { b: [Object] } }
+ *
+ */
+ export function inspect(value: unknown, options?: InspectOptions): string;
+
+ /** Build related information. */
+ export const build: {
+ /** The LLVM target triple */
+ target: string;
+ /** Instruction set architecture */
+ arch: "x86_64";
+ /** Operating system */
+ os: "darwin" | "linux" | "windows";
+ /** Computer vendor */
+ vendor: string;
+ /** Optional environment */
+ env?: string;
+ };
+
+ interface Version {
+ deno: string;
+ v8: string;
+ typescript: string;
+ }
+ /** Version related information. */
+ export const version: Version;
+
+ /** Returns the script arguments to the program. If for example we run a
+ * program:
+ *
+ * deno run --allow-read https://deno.land/std/examples/cat.ts /etc/passwd
+ *
+ * Then `Deno.args` will contain:
+ *
+ * [ "/etc/passwd" ]
+ */
+ export const args: string[];
+
+ /** A symbol which can be used as a key for a custom method which will be
+ * called when `Deno.inspect()` is called, or when the object is logged to
+ * the console. */
+ export const customInspect: unique symbol;
+}
diff --git a/cli/dts/lib.deno.shared_globals.d.ts b/cli/dts/lib.deno.shared_globals.d.ts
new file mode 100644
index 000000000..c77f1ea0e
--- /dev/null
+++ b/cli/dts/lib.deno.shared_globals.d.ts
@@ -0,0 +1,1657 @@
+// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
+
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, no-var */
+
+/// <reference no-default-lib="true" />
+/// <reference lib="esnext" />
+
+// This follows the WebIDL at: https://webassembly.github.io/spec/js-api/
+// and: https://webassembly.github.io/spec/web-api/
+declare namespace WebAssembly {
+ interface WebAssemblyInstantiatedSource {
+ module: Module;
+ instance: Instance;
+ }
+
+ /** Compiles a `WebAssembly.Module` from WebAssembly binary code. This
+ * function is useful if it is necessary to a compile a module before it can
+ * be instantiated (otherwise, the `WebAssembly.instantiate()` function
+ * should be used). */
+ function compile(bufferSource: BufferSource): Promise<Module>;
+
+ /** Compiles a `WebAssembly.Module` directly from a streamed underlying
+ * source. This function is useful if it is necessary to a compile a module
+ * before it can be instantiated (otherwise, the
+ * `WebAssembly.instantiateStreaming()` function should be used). */
+ function compileStreaming(source: Promise<Response>): Promise<Module>;
+
+ /** Takes the WebAssembly binary code, in the form of a typed array or
+ * `ArrayBuffer`, and performs both compilation and instantiation in one step.
+ * The returned `Promise` resolves to both a compiled `WebAssembly.Module` and
+ * its first `WebAssembly.Instance`. */
+ function instantiate(
+ bufferSource: BufferSource,
+ importObject?: object,
+ ): Promise<WebAssemblyInstantiatedSource>;
+
+ /** Takes an already-compiled `WebAssembly.Module` and returns a `Promise`
+ * that resolves to an `Instance` of that `Module`. This overload is useful if
+ * the `Module` has already been compiled. */
+ function instantiate(
+ module: Module,
+ importObject?: object,
+ ): Promise<Instance>;
+
+ /** Compiles and instantiates a WebAssembly module directly from a streamed
+ * underlying source. This is the most efficient, optimized way to load wasm
+ * code. */
+ function instantiateStreaming(
+ source: Promise<Response>,
+ importObject?: object,
+ ): Promise<WebAssemblyInstantiatedSource>;
+
+ /** Validates a given typed array of WebAssembly binary code, returning
+ * whether the bytes form a valid wasm module (`true`) or not (`false`). */
+ function validate(bufferSource: BufferSource): boolean;
+
+ type ImportExportKind = "function" | "table" | "memory" | "global";
+
+ interface ModuleExportDescriptor {
+ name: string;
+ kind: ImportExportKind;
+ }
+ interface ModuleImportDescriptor {
+ module: string;
+ name: string;
+ kind: ImportExportKind;
+ }
+
+ class Module {
+ constructor(bufferSource: BufferSource);
+
+ /** Given a `Module` and string, returns a copy of the contents of all
+ * custom sections in the module with the given string name. */
+ static customSections(
+ moduleObject: Module,
+ sectionName: string,
+ ): ArrayBuffer;
+
+ /** Given a `Module`, returns an array containing descriptions of all the
+ * declared exports. */
+ static exports(moduleObject: Module): ModuleExportDescriptor[];
+
+ /** Given a `Module`, returns an array containing descriptions of all the
+ * declared imports. */
+ static imports(moduleObject: Module): ModuleImportDescriptor[];
+ }
+
+ class Instance<T extends object = { [key: string]: any }> {
+ constructor(module: Module, importObject?: object);
+
+ /** An object containing as its members all the functions exported from the
+ * WebAssembly module instance, to allow them to be accessed and used by
+ * JavaScript. */
+ readonly exports: T;
+ }
+
+ interface MemoryDescriptor {
+ initial: number;
+ maximum?: number;
+ }
+
+ class Memory {
+ constructor(descriptor: MemoryDescriptor);
+
+ /** An accessor property that returns the buffer contained in the memory. */
+ readonly buffer: ArrayBuffer;
+
+ /** Increases the size of the memory instance by a specified number of
+ * WebAssembly pages (each one is 64KB in size). */
+ grow(delta: number): number;
+ }
+
+ type TableKind = "anyfunc";
+
+ interface TableDescriptor {
+ element: TableKind;
+ initial: number;
+ maximum?: number;
+ }
+
+ class Table {
+ constructor(descriptor: TableDescriptor);
+
+ /** Returns the length of the table, i.e. the number of elements. */
+ readonly length: number;
+
+ /** Accessor function — gets the element stored at a given index. */
+ get(index: number): (...args: any[]) => any;
+
+ /** Increases the size of the Table instance by a specified number of
+ * elements. */
+ grow(delta: number): number;
+
+ /** Sets an element stored at a given index to a given value. */
+ set(index: number, value: (...args: any[]) => any): void;
+ }
+
+ type ValueType = "i32" | "i64" | "f32" | "f64";
+
+ interface GlobalDescriptor {
+ value: ValueType;
+ mutable?: boolean;
+ }
+
+ /** Represents a global variable instance, accessible from both JavaScript and
+ * importable/exportable across one or more `WebAssembly.Module` instances.
+ * This allows dynamic linking of multiple modules. */
+ class Global {
+ constructor(descriptor: GlobalDescriptor, value?: any);
+
+ /** Old-style method that returns the value contained inside the global
+ * variable. */
+ valueOf(): any;
+
+ /** The value contained inside the global variable — this can be used to
+ * directly set and get the global's value. */
+ value: any;
+ }
+
+ /** Indicates an error during WebAssembly decoding or validation */
+ class CompileError extends Error {
+ constructor(message: string, fileName?: string, lineNumber?: string);
+ }
+
+ /** Indicates an error during module instantiation (besides traps from the
+ * start function). */
+ class LinkError extends Error {
+ constructor(message: string, fileName?: string, lineNumber?: string);
+ }
+
+ /** Is thrown whenever WebAssembly specifies a trap. */
+ class RuntimeError extends Error {
+ constructor(message: string, fileName?: string, lineNumber?: string);
+ }
+}
+
+/** Sets a timer which executes a function once after the timer expires. Returns
+ * an id which may be used to cancel the timeout.
+ *
+ * setTimeout(() => { console.log('hello'); }, 500);
+ */
+declare function setTimeout(
+ /** callback function to execute when timer expires */
+ cb: (...args: any[]) => void,
+ /** delay in ms */
+ delay?: number,
+ /** arguments passed to callback function */
+ ...args: any[]
+): number;
+
+/** Repeatedly calls a function , with a fixed time delay between each call.
+ *
+ * // Outputs 'hello' to the console every 500ms
+ * setInterval(() => { console.log('hello'); }, 500);
+ */
+declare function setInterval(
+ /** callback function to execute when timer expires */
+ cb: (...args: any[]) => void,
+ /** delay in ms */
+ delay?: number,
+ /** arguments passed to callback function */
+ ...args: any[]
+): number;
+
+/** Cancels a timed, repeating action which was previously started by a call
+ * to `setInterval()`
+ *
+ * const id = setInterval(()= > {console.log('hello');}, 500);
+ * ...
+ * clearInterval(id);
+ */
+declare function clearInterval(id?: number): void;
+
+/** Cancels a scheduled action initiated by `setTimeout()`
+ *
+ * const id = setTimeout(()= > {console.log('hello');}, 500);
+ * ...
+ * clearTimeout(id);
+ */
+declare function clearTimeout(id?: number): void;
+
+interface VoidFunction {
+ (): void;
+}
+
+/** A microtask is a short function which is executed after the function or
+ * module which created it exits and only if the JavaScript execution stack is
+ * empty, but before returning control to the event loop being used to drive the
+ * script's execution environment. This event loop may be either the main event
+ * loop or the event loop driving a web worker.
+ *
+ * queueMicrotask(() => { console.log('This event loop stack is complete'); });
+ */
+declare function queueMicrotask(func: VoidFunction): void;
+
+declare var console: Console;
+declare var crypto: Crypto;
+
+/** Registers an event listener in the global scope, which will be called
+ * synchronously whenever the event `type` is dispatched.
+ *
+ * addEventListener('unload', () => { console.log('All finished!'); });
+ * ...
+ * dispatchEvent(new Event('unload'));
+ */
+declare function addEventListener(
+ type: string,
+ callback: EventListenerOrEventListenerObject | null,
+ options?: boolean | AddEventListenerOptions | undefined,
+): void;
+
+/** Dispatches an event in the global scope, synchronously invoking any
+ * registered event listeners for this event in the appropriate order. Returns
+ * false if event is cancelable and at least one of the event handlers which
+ * handled this event called Event.preventDefault(). Otherwise it returns true.
+ *
+ * dispatchEvent(new Event('unload'));
+ */
+declare function dispatchEvent(event: Event): boolean;
+
+/** Remove a previously registered event listener from the global scope
+ *
+ * const lstnr = () => { console.log('hello'); };
+ * addEventListener('load', lstnr);
+ * removeEventListener('load', lstnr);
+ */
+declare function removeEventListener(
+ type: string,
+ callback: EventListenerOrEventListenerObject | null,
+ options?: boolean | EventListenerOptions | undefined,
+): void;
+
+interface DomIterable<K, V> {
+ keys(): IterableIterator<K>;
+ values(): IterableIterator<V>;
+ entries(): IterableIterator<[K, V]>;
+ [Symbol.iterator](): IterableIterator<[K, V]>;
+ forEach(
+ callback: (value: V, key: K, parent: this) => void,
+ thisArg?: any,
+ ): void;
+}
+
+interface ReadableStreamReadDoneResult<T> {
+ done: true;
+ value?: T;
+}
+
+interface ReadableStreamReadValueResult<T> {
+ done: false;
+ value: T;
+}
+
+type ReadableStreamReadResult<T> =
+ | ReadableStreamReadValueResult<T>
+ | ReadableStreamReadDoneResult<T>;
+
+interface ReadableStreamDefaultReader<R = any> {
+ readonly closed: Promise<void>;
+ cancel(reason?: any): Promise<void>;
+ read(): Promise<ReadableStreamReadResult<R>>;
+ releaseLock(): void;
+}
+
+interface ReadableStreamReader<R = any> {
+ cancel(): Promise<void>;
+ read(): Promise<ReadableStreamReadResult<R>>;
+ releaseLock(): void;
+}
+
+interface ReadableByteStreamControllerCallback {
+ (controller: ReadableByteStreamController): void | PromiseLike<void>;
+}
+
+interface UnderlyingByteSource {
+ autoAllocateChunkSize?: number;
+ cancel?: ReadableStreamErrorCallback;
+ pull?: ReadableByteStreamControllerCallback;
+ start?: ReadableByteStreamControllerCallback;
+ type: "bytes";
+}
+
+interface UnderlyingSource<R = any> {
+ cancel?: ReadableStreamErrorCallback;
+ pull?: ReadableStreamDefaultControllerCallback<R>;
+ start?: ReadableStreamDefaultControllerCallback<R>;
+ type?: undefined;
+}
+
+interface ReadableStreamErrorCallback {
+ (reason: any): void | PromiseLike<void>;
+}
+
+interface ReadableStreamDefaultControllerCallback<R> {
+ (controller: ReadableStreamDefaultController<R>): void | PromiseLike<void>;
+}
+
+interface ReadableStreamDefaultController<R = any> {
+ readonly desiredSize: number | null;
+ close(): void;
+ enqueue(chunk: R): void;
+ error(error?: any): void;
+}
+
+interface ReadableByteStreamController {
+ readonly byobRequest: undefined;
+ readonly desiredSize: number | null;
+ close(): void;
+ enqueue(chunk: ArrayBufferView): void;
+ error(error?: any): void;
+}
+
+interface PipeOptions {
+ preventAbort?: boolean;
+ preventCancel?: boolean;
+ preventClose?: boolean;
+ signal?: AbortSignal;
+}
+
+interface QueuingStrategySizeCallback<T = any> {
+ (chunk: T): number;
+}
+
+interface QueuingStrategy<T = any> {
+ highWaterMark?: number;
+ size?: QueuingStrategySizeCallback<T>;
+}
+
+/** This Streams API interface provides a built-in byte length queuing strategy
+ * that can be used when constructing streams. */
+declare class CountQueuingStrategy implements QueuingStrategy {
+ constructor(options: { highWaterMark: number });
+ highWaterMark: number;
+ size(chunk: any): 1;
+}
+
+declare class ByteLengthQueuingStrategy
+ implements QueuingStrategy<ArrayBufferView> {
+ constructor(options: { highWaterMark: number });
+ highWaterMark: number;
+ size(chunk: ArrayBufferView): number;
+}
+
+/** This Streams API interface 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. */
+interface ReadableStream<R = any> {
+ readonly locked: boolean;
+ cancel(reason?: any): Promise<void>;
+ getIterator(options?: { preventCancel?: boolean }): AsyncIterableIterator<R>;
+ // getReader(options: { mode: "byob" }): ReadableStreamBYOBReader;
+ getReader(): ReadableStreamDefaultReader<R>;
+ pipeThrough<T>(
+ {
+ writable,
+ readable,
+ }: {
+ writable: WritableStream<R>;
+ readable: ReadableStream<T>;
+ },
+ options?: PipeOptions,
+ ): ReadableStream<T>;
+ pipeTo(dest: WritableStream<R>, options?: PipeOptions): Promise<void>;
+ tee(): [ReadableStream<R>, ReadableStream<R>];
+ [Symbol.asyncIterator](options?: {
+ preventCancel?: boolean;
+ }): AsyncIterableIterator<R>;
+}
+
+declare var ReadableStream: {
+ prototype: ReadableStream;
+ new (
+ underlyingSource: UnderlyingByteSource,
+ strategy?: { highWaterMark?: number; size?: undefined },
+ ): ReadableStream<Uint8Array>;
+ new <R = any>(
+ underlyingSource?: UnderlyingSource<R>,
+ strategy?: QueuingStrategy<R>,
+ ): ReadableStream<R>;
+};
+
+interface WritableStreamDefaultControllerCloseCallback {
+ (): void | PromiseLike<void>;
+}
+
+interface WritableStreamDefaultControllerStartCallback {
+ (controller: WritableStreamDefaultController): void | PromiseLike<void>;
+}
+
+interface WritableStreamDefaultControllerWriteCallback<W> {
+ (chunk: W, controller: WritableStreamDefaultController):
+ | void
+ | PromiseLike<
+ void
+ >;
+}
+
+interface WritableStreamErrorCallback {
+ (reason: any): void | PromiseLike<void>;
+}
+
+interface UnderlyingSink<W = any> {
+ abort?: WritableStreamErrorCallback;
+ close?: WritableStreamDefaultControllerCloseCallback;
+ start?: WritableStreamDefaultControllerStartCallback;
+ type?: undefined;
+ write?: WritableStreamDefaultControllerWriteCallback<W>;
+}
+
+/** This Streams API interface provides a standard abstraction for writing
+ * streaming data to a destination, known as a sink. This object comes with
+ * built-in backpressure and queuing. */
+declare class WritableStream<W = any> {
+ constructor(
+ underlyingSink?: UnderlyingSink<W>,
+ strategy?: QueuingStrategy<W>,
+ );
+ readonly locked: boolean;
+ abort(reason?: any): Promise<void>;
+ close(): Promise<void>;
+ getWriter(): WritableStreamDefaultWriter<W>;
+}
+
+/** This Streams API interface 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. */
+interface WritableStreamDefaultController {
+ error(error?: any): void;
+}
+
+/** This Streams API interface 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. */
+interface WritableStreamDefaultWriter<W = any> {
+ readonly closed: Promise<void>;
+ readonly desiredSize: number | null;
+ readonly ready: Promise<void>;
+ abort(reason?: any): Promise<void>;
+ close(): Promise<void>;
+ releaseLock(): void;
+ write(chunk: W): Promise<void>;
+}
+
+declare class TransformStream<I = any, O = any> {
+ constructor(
+ transformer?: Transformer<I, O>,
+ writableStrategy?: QueuingStrategy<I>,
+ readableStrategy?: QueuingStrategy<O>,
+ );
+ readonly readable: ReadableStream<O>;
+ readonly writable: WritableStream<I>;
+}
+
+interface TransformStreamDefaultController<O = any> {
+ readonly desiredSize: number | null;
+ enqueue(chunk: O): void;
+ error(reason?: any): void;
+ terminate(): void;
+}
+
+interface Transformer<I = any, O = any> {
+ flush?: TransformStreamDefaultControllerCallback<O>;
+ readableType?: undefined;
+ start?: TransformStreamDefaultControllerCallback<O>;
+ transform?: TransformStreamDefaultControllerTransformCallback<I, O>;
+ writableType?: undefined;
+}
+
+interface TransformStreamDefaultControllerCallback<O> {
+ (controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
+}
+
+interface TransformStreamDefaultControllerTransformCallback<I, O> {
+ (
+ chunk: I,
+ controller: TransformStreamDefaultController<O>,
+ ): void | PromiseLike<void>;
+}
+
+interface DOMStringList {
+ /** Returns the number of strings in strings. */
+ readonly length: number;
+ /** Returns true if strings contains string, and false otherwise. */
+ contains(string: string): boolean;
+ /** Returns the string with index index from strings. */
+ item(index: number): string | null;
+ [index: number]: string;
+}
+
+declare class DOMException extends Error {
+ constructor(message?: string, name?: string);
+ readonly name: string;
+ readonly message: string;
+}
+
+type BufferSource = ArrayBufferView | ArrayBuffer;
+type BlobPart = BufferSource | Blob | string;
+
+interface BlobPropertyBag {
+ type?: string;
+ ending?: "transparent" | "native";
+}
+
+/** A file-like object of immutable, raw data. Blobs represent data that isn't necessarily in a JavaScript-native format. The File interface is based on Blob, inheriting blob functionality and expanding it to support files on the user's system. */
+interface Blob {
+ readonly size: number;
+ readonly type: string;
+ arrayBuffer(): Promise<ArrayBuffer>;
+ slice(start?: number, end?: number, contentType?: string): Blob;
+ stream(): ReadableStream;
+ text(): Promise<string>;
+}
+
+declare const Blob: {
+ prototype: Blob;
+ new (blobParts?: BlobPart[], options?: BlobPropertyBag): Blob;
+};
+
+interface FilePropertyBag extends BlobPropertyBag {
+ lastModified?: number;
+}
+
+/** Provides information about files and allows JavaScript in a web page to
+ * access their content. */
+interface File extends Blob {
+ readonly lastModified: number;
+ readonly name: string;
+}
+
+declare const File: {
+ prototype: File;
+ new (fileBits: BlobPart[], fileName: string, options?: FilePropertyBag): File;
+};
+
+declare const isConsoleInstance: unique symbol;
+
+declare class Console {
+ indentLevel: number;
+ [isConsoleInstance]: boolean;
+ /** Writes the arguments to stdout */
+ log: (...args: unknown[]) => void;
+ /** Writes the arguments to stdout */
+ debug: (...args: unknown[]) => void;
+ /** Writes the arguments to stdout */
+ info: (...args: unknown[]) => void;
+ /** Writes the properties of the supplied `obj` to stdout */
+ dir: (
+ obj: unknown,
+ options?: Partial<{
+ depth: number;
+ indentLevel: number;
+ }>,
+ ) => void;
+
+ /** From MDN:
+ * 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.
+ *
+ * Since we write to stdout, we can't display anything interactive
+ * we just fall back to `console.dir`.
+ */
+ dirxml: (
+ obj: unknown,
+ options?: Partial<{
+ showHidden: boolean;
+ depth: number;
+ colors: boolean;
+ indentLevel: number;
+ }>,
+ ) => void;
+
+ /** Writes the arguments to stdout */
+ warn: (...args: unknown[]) => void;
+ /** Writes the arguments to stdout */
+ error: (...args: unknown[]) => void;
+ /** Writes an error message to stdout if the assertion is `false`. If the
+ * assertion is `true`, nothing happens.
+ *
+ * ref: https://console.spec.whatwg.org/#assert
+ */
+ assert: (condition?: boolean, ...args: unknown[]) => void;
+ count: (label?: string) => void;
+ countReset: (label?: string) => void;
+ table: (data: unknown, properties?: string[] | undefined) => void;
+ time: (label?: string) => void;
+ timeLog: (label?: string, ...args: unknown[]) => void;
+ timeEnd: (label?: string) => void;
+ group: (...label: unknown[]) => void;
+ groupCollapsed: (...label: unknown[]) => void;
+ groupEnd: () => void;
+ clear: () => void;
+ trace: (...args: unknown[]) => void;
+ static [Symbol.hasInstance](instance: Console): boolean;
+}
+
+declare interface Crypto {
+ readonly subtle: null;
+ getRandomValues<
+ T extends
+ | Int8Array
+ | Int16Array
+ | Int32Array
+ | Uint8Array
+ | Uint16Array
+ | Uint32Array
+ | Uint8ClampedArray
+ | Float32Array
+ | Float64Array
+ | DataView
+ | null,
+ >(
+ array: T,
+ ): T;
+}
+
+type FormDataEntryValue = File | string;
+
+/** Provides a way to easily construct a set of key/value pairs representing
+ * form fields and their values, which can then be easily sent using the
+ * XMLHttpRequest.send() method. It uses the same format a form would use if the
+ * encoding type were set to "multipart/form-data". */
+interface FormData extends DomIterable<string, FormDataEntryValue> {
+ append(name: string, value: string | Blob, fileName?: string): void;
+ delete(name: string): void;
+ get(name: string): FormDataEntryValue | null;
+ getAll(name: string): FormDataEntryValue[];
+ has(name: string): boolean;
+ set(name: string, value: string | Blob, fileName?: string): void;
+}
+
+declare const FormData: {
+ prototype: FormData;
+ // TODO(ry) FormData constructor is non-standard.
+ // new(form?: HTMLFormElement): FormData;
+ new (): FormData;
+};
+
+interface Body {
+ /** A simple getter used to expose a `ReadableStream` of the body contents. */
+ readonly body: ReadableStream<Uint8Array> | null;
+ /** Stores a `Boolean` that declares whether the body has been used in a
+ * response yet.
+ */
+ readonly bodyUsed: boolean;
+ /** Takes a `Response` stream and reads it to completion. It returns a promise
+ * that resolves with an `ArrayBuffer`.
+ */
+ arrayBuffer(): Promise<ArrayBuffer>;
+ /** Takes a `Response` stream and reads it to completion. It returns a promise
+ * that resolves with a `Blob`.
+ */
+ blob(): Promise<Blob>;
+ /** Takes a `Response` stream and reads it to completion. It returns a promise
+ * that resolves with a `FormData` object.
+ */
+ formData(): Promise<FormData>;
+ /** Takes a `Response` stream and reads it to completion. It returns a promise
+ * that resolves with the result of parsing the body text as JSON.
+ */
+ json(): Promise<any>;
+ /** Takes a `Response` stream and reads it to completion. It returns a promise
+ * that resolves with a `USVString` (text).
+ */
+ text(): Promise<string>;
+}
+
+type HeadersInit = Headers | string[][] | Record<string, string>;
+
+/** This Fetch API interface allows you to perform various actions on HTTP
+ * request and response headers. These actions include retrieving, setting,
+ * adding to, and removing. A Headers object has an associated header list,
+ * which is initially empty and consists of zero or more name and value pairs.
+ *  You can add to this using methods like append() (see Examples.) In all
+ * methods of this interface, header names are matched by case-insensitive byte
+ * sequence. */
+interface Headers {
+ append(name: string, value: string): void;
+ delete(name: string): void;
+ get(name: string): string | null;
+ has(name: string): boolean;
+ set(name: string, value: string): void;
+ forEach(
+ callbackfn: (value: string, key: string, parent: Headers) => void,
+ thisArg?: any,
+ ): void;
+}
+
+interface Headers extends DomIterable<string, string> {
+ /** Appends a new value onto an existing header inside a `Headers` object, or
+ * adds the header if it does not already exist.
+ */
+ append(name: string, value: string): void;
+ /** Deletes a header from a `Headers` object. */
+ delete(name: string): void;
+ /** Returns an iterator allowing to go through all key/value pairs
+ * contained in this Headers object. The both the key and value of each pairs
+ * are ByteString objects.
+ */
+ entries(): IterableIterator<[string, string]>;
+ /** Returns a `ByteString` sequence of all the values of a header within a
+ * `Headers` object with a given name.
+ */
+ get(name: string): string | null;
+ /** Returns a boolean stating whether a `Headers` object contains a certain
+ * header.
+ */
+ has(name: string): boolean;
+ /** Returns an iterator allowing to go through all keys contained in
+ * this Headers object. The keys are ByteString objects.
+ */
+ keys(): IterableIterator<string>;
+ /** Sets a new value for an existing header inside a Headers object, or adds
+ * the header if it does not already exist.
+ */
+ set(name: string, value: string): void;
+ /** Returns an iterator allowing to go through all values contained in
+ * this Headers object. The values are ByteString objects.
+ */
+ values(): IterableIterator<string>;
+ forEach(
+ callbackfn: (value: string, key: string, parent: this) => void,
+ thisArg?: any,
+ ): void;
+ /** The Symbol.iterator well-known symbol specifies the default
+ * iterator for this Headers object
+ */
+ [Symbol.iterator](): IterableIterator<[string, string]>;
+}
+
+declare const Headers: {
+ prototype: Headers;
+ new (init?: HeadersInit): Headers;
+};
+
+type RequestInfo = Request | string;
+type RequestCache =
+ | "default"
+ | "force-cache"
+ | "no-cache"
+ | "no-store"
+ | "only-if-cached"
+ | "reload";
+type RequestCredentials = "include" | "omit" | "same-origin";
+type RequestMode = "cors" | "navigate" | "no-cors" | "same-origin";
+type RequestRedirect = "error" | "follow" | "manual";
+type ReferrerPolicy =
+ | ""
+ | "no-referrer"
+ | "no-referrer-when-downgrade"
+ | "origin"
+ | "origin-when-cross-origin"
+ | "same-origin"
+ | "strict-origin"
+ | "strict-origin-when-cross-origin"
+ | "unsafe-url";
+type BodyInit =
+ | Blob
+ | BufferSource
+ | FormData
+ | URLSearchParams
+ | ReadableStream<Uint8Array>
+ | string;
+type RequestDestination =
+ | ""
+ | "audio"
+ | "audioworklet"
+ | "document"
+ | "embed"
+ | "font"
+ | "image"
+ | "manifest"
+ | "object"
+ | "paintworklet"
+ | "report"
+ | "script"
+ | "sharedworker"
+ | "style"
+ | "track"
+ | "video"
+ | "worker"
+ | "xslt";
+
+interface RequestInit {
+ /**
+ * A BodyInit object or null to set request's body.
+ */
+ body?: BodyInit | null;
+ /**
+ * A string indicating how the request will interact with the browser's cache
+ * to set request's cache.
+ */
+ cache?: RequestCache;
+ /**
+ * A string indicating whether credentials will be sent with the request
+ * always, never, or only when sent to a same-origin URL. Sets request's
+ * credentials.
+ */
+ credentials?: RequestCredentials;
+ /**
+ * A Headers object, an object literal, or an array of two-item arrays to set
+ * request's headers.
+ */
+ headers?: HeadersInit;
+ /**
+ * A cryptographic hash of the resource to be fetched by request. Sets
+ * request's integrity.
+ */
+ integrity?: string;
+ /**
+ * A boolean to set request's keepalive.
+ */
+ keepalive?: boolean;
+ /**
+ * A string to set request's method.
+ */
+ method?: string;
+ /**
+ * A string to indicate whether the request will use CORS, or will be
+ * restricted to same-origin URLs. Sets request's mode.
+ */
+ mode?: RequestMode;
+ /**
+ * A string indicating whether request follows redirects, results in an error
+ * upon encountering a redirect, or returns the redirect (in an opaque
+ * fashion). Sets request's redirect.
+ */
+ redirect?: RequestRedirect;
+ /**
+ * A string whose value is a same-origin URL, "about:client", or the empty
+ * string, to set request's referrer.
+ */
+ referrer?: string;
+ /**
+ * A referrer policy to set request's referrerPolicy.
+ */
+ referrerPolicy?: ReferrerPolicy;
+ /**
+ * An AbortSignal to set request's signal.
+ */
+ signal?: AbortSignal | null;
+ /**
+ * Can only be null. Used to disassociate request from any Window.
+ */
+ window?: any;
+}
+
+/** This Fetch API interface represents a resource request. */
+interface Request extends Body {
+ /**
+ * Returns the cache mode associated with request, which is a string
+ * indicating how the request will interact with the browser's cache when
+ * fetching.
+ */
+ readonly cache: RequestCache;
+ /**
+ * Returns the credentials mode associated with request, which is a string
+ * indicating whether credentials will be sent with the request always, never,
+ * or only when sent to a same-origin URL.
+ */
+ readonly credentials: RequestCredentials;
+ /**
+ * Returns the kind of resource requested by request, e.g., "document" or "script".
+ */
+ readonly destination: RequestDestination;
+ /**
+ * Returns a Headers object consisting of the headers associated with request.
+ * Note that headers added in the network layer by the user agent will not be
+ * accounted for in this object, e.g., the "Host" header.
+ */
+ readonly headers: Headers;
+ /**
+ * Returns request's subresource integrity metadata, which is a cryptographic
+ * hash of the resource being fetched. Its value consists of multiple hashes
+ * separated by whitespace. [SRI]
+ */
+ readonly integrity: string;
+ /**
+ * Returns a boolean indicating whether or not request is for a history
+ * navigation (a.k.a. back-forward navigation).
+ */
+ readonly isHistoryNavigation: boolean;
+ /**
+ * Returns a boolean indicating whether or not request is for a reload
+ * navigation.
+ */
+ readonly isReloadNavigation: boolean;
+ /**
+ * Returns a boolean indicating whether or not request can outlive the global
+ * in which it was created.
+ */
+ readonly keepalive: boolean;
+ /**
+ * Returns request's HTTP method, which is "GET" by default.
+ */
+ readonly method: string;
+ /**
+ * Returns the mode associated with request, which is a string indicating
+ * whether the request will use CORS, or will be restricted to same-origin
+ * URLs.
+ */
+ readonly mode: RequestMode;
+ /**
+ * Returns the redirect mode associated with request, which is a string
+ * indicating how redirects for the request will be handled during fetching. A
+ * request will follow redirects by default.
+ */
+ readonly redirect: RequestRedirect;
+ /**
+ * Returns the referrer of request. Its value can be a same-origin URL if
+ * explicitly set in init, the empty string to indicate no referrer, and
+ * "about:client" when defaulting to the global's default. This is used during
+ * fetching to determine the value of the `Referer` header of the request
+ * being made.
+ */
+ readonly referrer: string;
+ /**
+ * Returns the referrer policy associated with request. This is used during
+ * fetching to compute the value of the request's referrer.
+ */
+ readonly referrerPolicy: ReferrerPolicy;
+ /**
+ * Returns the signal associated with request, which is an AbortSignal object
+ * indicating whether or not request has been aborted, and its abort event
+ * handler.
+ */
+ readonly signal: AbortSignal;
+ /**
+ * Returns the URL of request as a string.
+ */
+ readonly url: string;
+ clone(): Request;
+}
+
+declare const Request: {
+ prototype: Request;
+ new (input: RequestInfo, init?: RequestInit): Request;
+};
+
+interface ResponseInit {
+ headers?: HeadersInit;
+ status?: number;
+ statusText?: string;
+}
+
+type ResponseType =
+ | "basic"
+ | "cors"
+ | "default"
+ | "error"
+ | "opaque"
+ | "opaqueredirect";
+
+/** This Fetch API interface represents the response to a request. */
+interface Response extends Body {
+ readonly headers: Headers;
+ readonly ok: boolean;
+ readonly redirected: boolean;
+ readonly status: number;
+ readonly statusText: string;
+ readonly trailer: Promise<Headers>;
+ readonly type: ResponseType;
+ readonly url: string;
+ clone(): Response;
+}
+
+declare const Response: {
+ prototype: Response;
+ new (body?: BodyInit | null, init?: ResponseInit): Response;
+ error(): Response;
+ redirect(url: string, status?: number): Response;
+};
+
+/** Fetch a resource from the network. It returns a Promise that resolves to the
+ * Response to that request, whether it is successful or not.
+ *
+ * const response = await fetch("http://my.json.host/data.json");
+ * console.log(response.status); // e.g. 200
+ * console.log(response.statusText); // e.g. "OK"
+ * const jsonData = await response.json();
+ */
+declare function fetch(
+ input: Request | URL | string,
+ init?: RequestInit,
+): Promise<Response>;
+
+/** Decodes a string of data which has been encoded using base-64 encoding.
+ *
+ * console.log(atob("aGVsbG8gd29ybGQ=")); // outputs 'hello world'
+ */
+declare function atob(s: string): string;
+
+/** Creates a base-64 ASCII encoded string from the input string.
+ *
+ * console.log(btoa("hello world")); // outputs "aGVsbG8gd29ybGQ="
+ */
+declare function btoa(s: string): string;
+
+declare class TextDecoder {
+ /** Returns encoding's name, lowercased. */
+ readonly encoding: string;
+ /** Returns `true` if error mode is "fatal", and `false` otherwise. */
+ readonly fatal: boolean;
+ /** Returns `true` if ignore BOM flag is set, and `false` otherwise. */
+ readonly ignoreBOM = false;
+ constructor(
+ label?: string,
+ options?: { fatal?: boolean; ignoreBOM?: boolean },
+ );
+ /** Returns the result of running encoding's decoder. */
+ decode(input?: BufferSource, options?: { stream?: false }): string;
+ readonly [Symbol.toStringTag]: string;
+}
+
+declare class TextEncoder {
+ /** Returns "utf-8". */
+ readonly encoding = "utf-8";
+ /** Returns the result of running UTF-8's encoder. */
+ encode(input?: string): Uint8Array;
+ encodeInto(
+ input: string,
+ dest: Uint8Array,
+ ): { read: number; written: number };
+ readonly [Symbol.toStringTag]: string;
+}
+
+interface URLSearchParams {
+ /** Appends a specified key/value pair as a new search parameter.
+ *
+ * ```ts
+ * let searchParams = new URLSearchParams();
+ * searchParams.append('name', 'first');
+ * searchParams.append('name', 'second');
+ * ```
+ */
+ append(name: string, value: string): void;
+
+ /** Deletes the given search parameter and its associated value,
+ * from the list of all search parameters.
+ *
+ * ```ts
+ * let searchParams = new URLSearchParams([['name', 'value']]);
+ * searchParams.delete('name');
+ * ```
+ */
+ delete(name: string): void;
+
+ /** Returns all the values associated with a given search parameter
+ * as an array.
+ *
+ * ```ts
+ * searchParams.getAll('name');
+ * ```
+ */
+ getAll(name: string): string[];
+
+ /** Returns the first value associated to the given search parameter.
+ *
+ * ```ts
+ * searchParams.get('name');
+ * ```
+ */
+ get(name: string): string | null;
+
+ /** Returns a Boolean that indicates whether a parameter with the
+ * specified name exists.
+ *
+ * ```ts
+ * searchParams.has('name');
+ * ```
+ */
+ has(name: string): boolean;
+
+ /** 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.
+ *
+ * ```ts
+ * searchParams.set('name', 'value');
+ * ```
+ */
+ set(name: string, value: string): void;
+
+ /** Sort all key/value pairs contained in this object in place and
+ * return undefined. The sort order is according to Unicode code
+ * points of the keys.
+ *
+ * ```ts
+ * searchParams.sort();
+ * ```
+ */
+ sort(): void;
+
+ /** Calls a function for each element contained in this object in
+ * place and return undefined. Optionally accepts an object to use
+ * as this when executing callback as second argument.
+ *
+ * ```ts
+ * const params = new URLSearchParams([["a", "b"], ["c", "d"]]);
+ * params.forEach((value, key, parent) => {
+ * console.log(value, key, parent);
+ * });
+ * ```
+ *
+ */
+ forEach(
+ callbackfn: (value: string, key: string, parent: this) => void,
+ thisArg?: any,
+ ): void;
+
+ /** Returns an iterator allowing to go through all keys contained
+ * in this object.
+ *
+ * ```ts
+ * const params = new URLSearchParams([["a", "b"], ["c", "d"]]);
+ * for (const key of params.keys()) {
+ * console.log(key);
+ * }
+ * ```
+ */
+ keys(): IterableIterator<string>;
+
+ /** Returns an iterator allowing to go through all values contained
+ * in this object.
+ *
+ * ```ts
+ * const params = new URLSearchParams([["a", "b"], ["c", "d"]]);
+ * for (const value of params.values()) {
+ * console.log(value);
+ * }
+ * ```
+ */
+ values(): IterableIterator<string>;
+
+ /** Returns an iterator allowing to go through all key/value
+ * pairs contained in this object.
+ *
+ * ```ts
+ * const params = new URLSearchParams([["a", "b"], ["c", "d"]]);
+ * for (const [key, value] of params.entries()) {
+ * console.log(key, value);
+ * }
+ * ```
+ */
+ entries(): IterableIterator<[string, string]>;
+
+ /** Returns an iterator allowing to go through all key/value
+ * pairs contained in this object.
+ *
+ * ```ts
+ * const params = new URLSearchParams([["a", "b"], ["c", "d"]]);
+ * for (const [key, value] of params) {
+ * console.log(key, value);
+ * }
+ * ```
+ */
+ [Symbol.iterator](): IterableIterator<[string, string]>;
+
+ /** Returns a query string suitable for use in a URL.
+ *
+ * ```ts
+ * searchParams.toString();
+ * ```
+ */
+ toString(): string;
+}
+
+declare const URLSearchParams: {
+ prototype: URLSearchParams;
+ new (
+ init?: string[][] | Record<string, string> | string | URLSearchParams,
+ ): URLSearchParams;
+ toString(): string;
+};
+
+/** The URL interface represents an object providing static methods used for creating object URLs. */
+interface URL {
+ hash: string;
+ host: string;
+ hostname: string;
+ href: string;
+ toString(): string;
+ readonly origin: string;
+ password: string;
+ pathname: string;
+ port: string;
+ protocol: string;
+ search: string;
+ readonly searchParams: URLSearchParams;
+ username: string;
+ toJSON(): string;
+}
+
+declare const URL: {
+ prototype: URL;
+ new (url: string, base?: string | URL): URL;
+ createObjectURL(object: any): string;
+ revokeObjectURL(url: string): void;
+};
+
+interface MessageEventInit extends EventInit {
+ data?: any;
+ origin?: string;
+ lastEventId?: string;
+}
+
+declare class MessageEvent extends Event {
+ readonly data: any;
+ readonly origin: string;
+ readonly lastEventId: string;
+ constructor(type: string, eventInitDict?: MessageEventInit);
+}
+
+interface ErrorEventInit extends EventInit {
+ message?: string;
+ filename?: string;
+ lineno?: number;
+ colno?: number;
+ error?: any;
+}
+
+declare class ErrorEvent extends Event {
+ readonly message: string;
+ readonly filename: string;
+ readonly lineno: number;
+ readonly colno: number;
+ readonly error: any;
+ constructor(type: string, eventInitDict?: ErrorEventInit);
+}
+
+interface PostMessageOptions {
+ transfer?: any[];
+}
+
+declare class Worker extends EventTarget {
+ onerror?: (e: ErrorEvent) => void;
+ onmessage?: (e: MessageEvent) => void;
+ onmessageerror?: (e: MessageEvent) => void;
+ constructor(
+ specifier: string,
+ options?: {
+ type?: "classic" | "module";
+ name?: string;
+ /** UNSTABLE: New API. Expect many changes; most likely this
+ * field will be made into an object for more granular
+ * configuration of worker thread (permissions, import map, etc.).
+ *
+ * Set to `true` to make `Deno` namespace and all of its methods
+ * available to worker thread.
+ *
+ * Currently worker inherits permissions from main thread (permissions
+ * given using `--allow-*` flags).
+ * Configurable permissions are on the roadmap to be implemented.
+ *
+ * Example:
+ *
+ * ```ts
+ * // mod.ts
+ * const worker = new Worker(
+ * new URL("deno_worker.ts", import.meta.url).href,
+ * { type: "module", deno: true }
+ * );
+ * worker.postMessage({ cmd: "readFile", fileName: "./log.txt" });
+ *
+ * // deno_worker.ts
+ *
+ *
+ * self.onmessage = async function (e) {
+ * const { cmd, fileName } = e.data;
+ * if (cmd !== "readFile") {
+ * throw new Error("Invalid command");
+ * }
+ * const buf = await Deno.readFile(fileName);
+ * const fileContents = new TextDecoder().decode(buf);
+ * console.log(fileContents);
+ * }
+ * ```
+ *
+ * // log.txt
+ * hello world
+ * hello world 2
+ *
+ * // run program
+ * $ deno run --allow-read mod.ts
+ * hello world
+ * hello world2
+ *
+ */
+ deno?: boolean;
+ },
+ );
+ postMessage(message: any, transfer: ArrayBuffer[]): void;
+ postMessage(message: any, options?: PostMessageOptions): void;
+ terminate(): void;
+}
+
+declare type PerformanceEntryList = PerformanceEntry[];
+
+declare interface Performance {
+ /** Removes the stored timestamp with the associated name. */
+ clearMarks(markName?: string): void;
+
+ /** Removes stored timestamp with the associated name. */
+ clearMeasures(measureName?: string): void;
+
+ getEntries(): PerformanceEntryList;
+ getEntriesByName(name: string, type?: string): PerformanceEntryList;
+ getEntriesByType(type: string): PerformanceEntryList;
+
+ /** Stores a timestamp with the associated name (a "mark"). */
+ mark(markName: string, options?: PerformanceMarkOptions): PerformanceMark;
+
+ /** Stores the `DOMHighResTimeStamp` duration between two marks along with the
+ * associated name (a "measure"). */
+ measure(
+ measureName: string,
+ options?: PerformanceMeasureOptions,
+ ): PerformanceMeasure;
+ /** Stores the `DOMHighResTimeStamp` duration between two marks along with the
+ * associated name (a "measure"). */
+ measure(
+ measureName: string,
+ startMark?: string,
+ endMark?: string,
+ ): PerformanceMeasure;
+
+ /** Returns a current time from Deno's start in milliseconds.
+ *
+ * Use the permission flag `--allow-hrtime` return a precise value.
+ *
+ * ```ts
+ * const t = performance.now();
+ * console.log(`${t} ms since start!`);
+ * ```
+ */
+ now(): number;
+}
+
+declare const Performance: {
+ prototype: Performance;
+ new (): Performance;
+};
+
+declare const performance: Performance;
+
+declare interface PerformanceMarkOptions {
+ /** Metadata to be included in the mark. */
+ detail?: any;
+
+ /** Timestamp to be used as the mark time. */
+ startTime?: number;
+}
+
+declare interface PerformanceMeasureOptions {
+ /** Metadata to be included in the measure. */
+ detail?: any;
+
+ /** Timestamp to be used as the start time or string to be used as start
+ * mark.*/
+ start?: string | number;
+
+ /** Duration between the start and end times. */
+ duration?: number;
+
+ /** Timestamp to be used as the end time or string to be used as end mark. */
+ end?: string | number;
+}
+
+/** Encapsulates a single performance metric that is part of the performance
+ * timeline. A performance entry can be directly created by making a performance
+ * mark or measure (for example by calling the `.mark()` method) at an explicit
+ * point in an application. */
+declare class PerformanceEntry {
+ readonly duration: number;
+ readonly entryType: string;
+ readonly name: string;
+ readonly startTime: number;
+ toJSON(): any;
+}
+
+/** `PerformanceMark` is an abstract interface for `PerformanceEntry` objects
+ * with an entryType of `"mark"`. Entries of this type are created by calling
+ * `performance.mark()` to add a named `DOMHighResTimeStamp` (the mark) to the
+ * performance timeline. */
+declare class PerformanceMark extends PerformanceEntry {
+ readonly detail: any;
+ readonly entryType: "mark";
+ constructor(name: string, options?: PerformanceMarkOptions);
+}
+
+/** `PerformanceMeasure` is an abstract interface for `PerformanceEntry` objects
+ * with an entryType of `"measure"`. Entries of this type are created by calling
+ * `performance.measure()` to add a named `DOMHighResTimeStamp` (the measure)
+ * between two marks to the performance timeline. */
+declare class PerformanceMeasure extends PerformanceEntry {
+ readonly detail: any;
+ readonly entryType: "measure";
+}
+
+interface EventInit {
+ bubbles?: boolean;
+ cancelable?: boolean;
+ composed?: boolean;
+}
+
+/** An event which takes place in the DOM. */
+declare class Event {
+ constructor(type: string, eventInitDict?: EventInit);
+ /** Returns true or false depending on how event was initialized. True if
+ * event goes through its target's ancestors in reverse tree order, and
+ * false otherwise. */
+ readonly bubbles: boolean;
+ cancelBubble: boolean;
+ /** Returns true or false depending on how event was initialized. Its return
+ * value does not always carry meaning, but true can indicate that part of the
+ * operation during which event was dispatched, can be canceled by invoking
+ * the preventDefault() method. */
+ readonly cancelable: boolean;
+ /** Returns true or false depending on how event was initialized. True if
+ * event invokes listeners past a ShadowRoot node that is the root of its
+ * target, and false otherwise. */
+ readonly composed: boolean;
+ /** Returns the object whose event listener's callback is currently being
+ * invoked. */
+ readonly currentTarget: EventTarget | null;
+ /** Returns true if preventDefault() was invoked successfully to indicate
+ * cancellation, and false otherwise. */
+ readonly defaultPrevented: boolean;
+ /** Returns the event's phase, which is one of NONE, CAPTURING_PHASE,
+ * AT_TARGET, and BUBBLING_PHASE. */
+ readonly eventPhase: number;
+ /** Returns true if event was dispatched by the user agent, and false
+ * otherwise. */
+ readonly isTrusted: boolean;
+ /** Returns the object to which event is dispatched (its target). */
+ readonly target: EventTarget | null;
+ /** Returns the event's timestamp as the number of milliseconds measured
+ * relative to the time origin. */
+ readonly timeStamp: number;
+ /** Returns the type of event, e.g. "click", "hashchange", or "submit". */
+ readonly type: string;
+ /** Returns the invocation target objects of event's path (objects on which
+ * listeners will be invoked), except for any nodes in shadow trees of which
+ * the shadow root's mode is "closed" that are not reachable from event's
+ * currentTarget. */
+ composedPath(): EventTarget[];
+ /** If invoked when the cancelable attribute value is true, and while
+ * executing a listener for the event with passive set to false, signals to
+ * the operation that caused event to be dispatched that it needs to be
+ * canceled. */
+ preventDefault(): void;
+ /** Invoking this method prevents event from reaching any registered event
+ * listeners after the current one finishes running and, when dispatched in a
+ * tree, also prevents event from reaching any other objects. */
+ stopImmediatePropagation(): void;
+ /** When dispatched in a tree, invoking this method prevents event from
+ * reaching any objects other than the current object. */
+ stopPropagation(): void;
+ readonly AT_TARGET: number;
+ readonly BUBBLING_PHASE: number;
+ readonly CAPTURING_PHASE: number;
+ readonly NONE: number;
+ static readonly AT_TARGET: number;
+ static readonly BUBBLING_PHASE: number;
+ static readonly CAPTURING_PHASE: number;
+ static readonly NONE: number;
+}
+
+/**
+ * EventTarget is a DOM interface implemented by objects that can receive events
+ * and may have listeners for them.
+ */
+declare class EventTarget {
+ /** Appends an event listener for events whose type attribute value is type.
+ * The callback argument sets the callback that will be invoked when the event
+ * is dispatched.
+ *
+ * The options argument sets listener-specific options. For compatibility this
+ * can be a boolean, in which case the method behaves exactly as if the value
+ * was specified as options's capture.
+ *
+ * When set to true, options's capture prevents callback from being invoked
+ * when the event's eventPhase attribute value is BUBBLING_PHASE. When false
+ * (or not present), callback will not be invoked when event's eventPhase
+ * attribute value is CAPTURING_PHASE. Either way, callback will be invoked if
+ * event's eventPhase attribute value is AT_TARGET.
+ *
+ * When set to true, options's passive indicates that the callback will not
+ * cancel the event by invoking preventDefault(). This is used to enable
+ * performance optimizations described in § 2.8 Observing event listeners.
+ *
+ * When set to true, options's once indicates that the callback will only be
+ * invoked once after which the event listener will be removed.
+ *
+ * The event listener is appended to target's event listener list and is not
+ * appended if it has the same type, callback, and capture. */
+ addEventListener(
+ type: string,
+ listener: EventListenerOrEventListenerObject | null,
+ options?: boolean | AddEventListenerOptions,
+ ): void;
+ /** Dispatches a synthetic event event to target and returns true if either
+ * event's cancelable attribute value is false or its preventDefault() method
+ * was not invoked, and false otherwise. */
+ dispatchEvent(event: Event): boolean;
+ /** Removes the event listener in target's event listener list with the same
+ * type, callback, and options. */
+ removeEventListener(
+ type: string,
+ callback: EventListenerOrEventListenerObject | null,
+ options?: EventListenerOptions | boolean,
+ ): void;
+ [Symbol.toStringTag]: string;
+}
+
+interface EventListener {
+ (evt: Event): void | Promise<void>;
+}
+
+interface EventListenerObject {
+ handleEvent(evt: Event): void | Promise<void>;
+}
+
+declare type EventListenerOrEventListenerObject =
+ | EventListener
+ | EventListenerObject;
+
+interface AddEventListenerOptions extends EventListenerOptions {
+ once?: boolean;
+ passive?: boolean;
+}
+
+interface EventListenerOptions {
+ capture?: boolean;
+}
+
+/** Events measuring progress of an underlying process, like an HTTP request
+ * (for an XMLHttpRequest, or the loading of the underlying resource of an
+ * <img>, <audio>, <video>, <style> or <link>). */
+interface ProgressEvent<T extends EventTarget = EventTarget> extends Event {
+ readonly lengthComputable: boolean;
+ readonly loaded: number;
+ readonly target: T | null;
+ readonly total: number;
+}
+
+interface CustomEventInit<T = any> extends EventInit {
+ detail?: T;
+}
+
+declare class CustomEvent<T = any> extends Event {
+ constructor(typeArg: string, eventInitDict?: CustomEventInit<T>);
+ /** Returns any custom data event was created with. Typically used for
+ * synthetic events. */
+ readonly detail: T;
+}
+
+/** A controller object that allows you to abort one or more DOM requests as and
+ * when desired. */
+declare class AbortController {
+ /** Returns the AbortSignal object associated with this object. */
+ readonly signal: AbortSignal;
+ /** Invoking this method will set this object's AbortSignal's aborted flag and
+ * signal to any observers that the associated activity is to be aborted. */
+ abort(): void;
+}
+
+interface AbortSignalEventMap {
+ abort: Event;
+}
+
+/** A signal object that allows you to communicate with a DOM request (such as a
+ * Fetch) and abort it if required via an AbortController object. */
+interface AbortSignal extends EventTarget {
+ /** Returns true if this AbortSignal's AbortController has signaled to abort,
+ * and false otherwise. */
+ readonly aborted: boolean;
+ onabort: ((this: AbortSignal, ev: Event) => any) | null;
+ addEventListener<K extends keyof AbortSignalEventMap>(
+ type: K,
+ listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any,
+ options?: boolean | AddEventListenerOptions,
+ ): void;
+ addEventListener(
+ type: string,
+ listener: EventListenerOrEventListenerObject,
+ options?: boolean | AddEventListenerOptions,
+ ): void;
+ removeEventListener<K extends keyof AbortSignalEventMap>(
+ type: K,
+ listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any,
+ options?: boolean | EventListenerOptions,
+ ): void;
+ removeEventListener(
+ type: string,
+ listener: EventListenerOrEventListenerObject,
+ options?: boolean | EventListenerOptions,
+ ): void;
+}
+
+declare const AbortSignal: {
+ prototype: AbortSignal;
+ new (): AbortSignal;
+};
+
+interface ErrorConstructor {
+ /** See https://v8.dev/docs/stack-trace-api#stack-trace-collection-for-custom-exceptions. */
+ // eslint-disable-next-line @typescript-eslint/ban-types
+ captureStackTrace(error: Object, constructor?: Function): void;
+ // TODO(nayeemrmn): Support `Error.prepareStackTrace()`. We currently use this
+ // internally in a way that makes it unavailable for users.
+}
diff --git a/cli/dts/lib.deno.unstable.d.ts b/cli/dts/lib.deno.unstable.d.ts
new file mode 100644
index 000000000..d23536c42
--- /dev/null
+++ b/cli/dts/lib.deno.unstable.d.ts
@@ -0,0 +1,1217 @@
+// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
+
+/// <reference no-default-lib="true" />
+/// <reference lib="deno.ns" />
+
+declare namespace Deno {
+ /**
+ * **UNSTABLE**: New API, yet to be vetted. This API is under consideration to
+ * determine if permissions are required to call it.
+ *
+ * Retrieve the process umask. If `mask` is provided, sets the process umask.
+ * This call always returns what the umask was before the call.
+ *
+ * ```ts
+ * console.log(Deno.umask()); // e.g. 18 (0o022)
+ * const prevUmaskValue = Deno.umask(0o077); // e.g. 18 (0o022)
+ * console.log(Deno.umask()); // e.g. 63 (0o077)
+ * ```
+ *
+ * NOTE: This API is not implemented on Windows
+ */
+ export function umask(mask?: number): number;
+
+ /** **UNSTABLE**: This API needs a security review.
+ *
+ * Synchronously creates `newpath` as a hard link to `oldpath`.
+ *
+ * ```ts
+ * Deno.linkSync("old/name", "new/name");
+ * ```
+ *
+ * Requires `allow-read` and `allow-write` permissions. */
+ export function linkSync(oldpath: string, newpath: string): void;
+
+ /** **UNSTABLE**: This API needs a security review.
+ *
+ * Creates `newpath` as a hard link to `oldpath`.
+ *
+ * ```ts
+ * await Deno.link("old/name", "new/name");
+ * ```
+ *
+ * Requires `allow-read` and `allow-write` permissions. */
+ export function link(oldpath: string, newpath: string): Promise<void>;
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ *
+ * Gets the size of the console as columns/rows.
+ *
+ * ```ts
+ * const { columns, rows } = await Deno.consoleSize(Deno.stdout.rid);
+ * ```
+ */
+ export function consoleSize(
+ rid: number,
+ ): {
+ columns: number;
+ rows: number;
+ };
+
+ export type SymlinkOptions = {
+ type: "file" | "dir";
+ };
+
+ /** **UNSTABLE**: This API needs a security review.
+ *
+ * Creates `newpath` as a symbolic link to `oldpath`.
+ *
+ * The options.type parameter can be set to `file` or `dir`. This argument is only
+ * available on Windows and ignored on other platforms.
+ *
+ * ```ts
+ * Deno.symlinkSync("old/name", "new/name");
+ * ```
+ *
+ * Requires `allow-write` permission. */
+ export function symlinkSync(
+ oldpath: string,
+ newpath: string,
+ options?: SymlinkOptions,
+ ): void;
+
+ /** **UNSTABLE**: This API needs a security review.
+ *
+ * Creates `newpath` as a symbolic link to `oldpath`.
+ *
+ * The options.type parameter can be set to `file` or `dir`. This argument is only
+ * available on Windows and ignored on other platforms.
+ *
+ * ```ts
+ * await Deno.symlink("old/name", "new/name");
+ * ```
+ *
+ * Requires `allow-write` permission. */
+ export function symlink(
+ oldpath: string,
+ newpath: string,
+ options?: SymlinkOptions,
+ ): Promise<void>;
+
+ /** **Unstable** There are questions around which permission this needs. And
+ * maybe should be renamed (loadAverage?)
+ *
+ * Returns an array containing the 1, 5, and 15 minute load averages. The
+ * load average is a measure of CPU and IO utilization of the last one, five,
+ * and 15 minute periods expressed as a fractional number. Zero means there
+ * is no load. On Windows, the three values are always the same and represent
+ * the current load, not the 1, 5 and 15 minute load averages.
+ *
+ * ```ts
+ * console.log(Deno.loadavg()); // e.g. [ 0.71, 0.44, 0.44 ]
+ * ```
+ *
+ * Requires `allow-env` permission.
+ */
+ export function loadavg(): number[];
+
+ /** **Unstable** new API. yet to be vetted. Under consideration to possibly move to
+ * Deno.build or Deno.versions and if it should depend sys-info, which may not
+ * be desireable.
+ *
+ * Returns the release version of the Operating System.
+ *
+ * ```ts
+ * console.log(Deno.osRelease());
+ * ```
+ *
+ * Requires `allow-env` permission.
+ *
+ */
+ export function osRelease(): string;
+
+ /** **UNSTABLE**: new API, yet to be vetted.
+ *
+ * Open and initialize a plugin.
+ *
+ * ```ts
+ * const rid = Deno.openPlugin("./path/to/some/plugin.so");
+ * const opId = Deno.core.ops()["some_op"];
+ * const response = Deno.core.dispatch(opId, new Uint8Array([1,2,3,4]));
+ * console.log(`Response from plugin ${response}`);
+ * ```
+ *
+ * Requires `allow-plugin` permission.
+ *
+ * The plugin system is not stable and will change in the future, hence the
+ * lack of docs. For now take a look at the example
+ * https://github.com/denoland/deno/tree/master/test_plugin
+ */
+ export function openPlugin(filename: string): number;
+
+ /** The log category for a diagnostic message. */
+ export enum DiagnosticCategory {
+ Log = 0,
+ Debug = 1,
+ Info = 2,
+ Error = 3,
+ Warning = 4,
+ Suggestion = 5,
+ }
+
+ export interface DiagnosticMessageChain {
+ message: string;
+ category: DiagnosticCategory;
+ code: number;
+ next?: DiagnosticMessageChain[];
+ }
+
+ export interface DiagnosticItem {
+ /** A string message summarizing the diagnostic. */
+ message: string;
+ /** An ordered array of further diagnostics. */
+ messageChain?: DiagnosticMessageChain;
+ /** Information related to the diagnostic. This is present when there is a
+ * suggestion or other additional diagnostic information */
+ relatedInformation?: DiagnosticItem[];
+ /** The text of the source line related to the diagnostic. */
+ sourceLine?: string;
+ /** The line number that is related to the diagnostic. */
+ lineNumber?: number;
+ /** The name of the script resource related to the diagnostic. */
+ scriptResourceName?: string;
+ /** The start position related to the diagnostic. */
+ startPosition?: number;
+ /** The end position related to the diagnostic. */
+ endPosition?: number;
+ /** The category of the diagnostic. */
+ category: DiagnosticCategory;
+ /** A number identifier. */
+ code: number;
+ /** The the start column of the sourceLine related to the diagnostic. */
+ startColumn?: number;
+ /** The end column of the sourceLine related to the diagnostic. */
+ endColumn?: number;
+ }
+
+ export interface Diagnostic {
+ /** An array of diagnostic items. */
+ items: DiagnosticItem[];
+ }
+
+ /** **UNSTABLE**: new API, yet to be vetted.
+ *
+ * Format an array of diagnostic items and return them as a single string in a
+ * user friendly format.
+ *
+ * ```ts
+ * const [diagnostics, result] = Deno.compile("file_with_compile_issues.ts");
+ * console.table(diagnostics); // Prints raw diagnostic data
+ * console.log(Deno.formatDiagnostics(diagnostics)); // User friendly output of diagnostics
+ * ```
+ *
+ * @param items An array of diagnostic items to format
+ */
+ export function formatDiagnostics(items: DiagnosticItem[]): string;
+
+ /** **UNSTABLE**: new API, yet to be vetted.
+ *
+ * A specific subset TypeScript compiler options that can be supported by the
+ * Deno TypeScript compiler. */
+ export interface CompilerOptions {
+ /** Allow JavaScript files to be compiled. Defaults to `true`. */
+ allowJs?: boolean;
+ /** Allow default imports from modules with no default export. This does not
+ * affect code emit, just typechecking. Defaults to `false`. */
+ allowSyntheticDefaultImports?: boolean;
+ /** Allow accessing UMD globals from modules. Defaults to `false`. */
+ allowUmdGlobalAccess?: boolean;
+ /** Do not report errors on unreachable code. Defaults to `false`. */
+ allowUnreachableCode?: boolean;
+ /** Do not report errors on unused labels. Defaults to `false` */
+ allowUnusedLabels?: boolean;
+ /** Parse in strict mode and emit `"use strict"` for each source file.
+ * Defaults to `true`. */
+ alwaysStrict?: boolean;
+ /** Base directory to resolve non-relative module names. Defaults to
+ * `undefined`. */
+ baseUrl?: string;
+ /** Report errors in `.js` files. Use in conjunction with `allowJs`. Defaults
+ * to `false`. */
+ checkJs?: boolean;
+ /** Generates corresponding `.d.ts` file. Defaults to `false`. */
+ declaration?: boolean;
+ /** Output directory for generated declaration files. */
+ declarationDir?: string;
+ /** Generates a source map for each corresponding `.d.ts` file. Defaults to
+ * `false`. */
+ declarationMap?: boolean;
+ /** Provide full support for iterables in `for..of`, spread and
+ * destructuring when targeting ES5 or ES3. Defaults to `false`. */
+ downlevelIteration?: boolean;
+ /** Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files.
+ * Defaults to `false`. */
+ emitBOM?: boolean;
+ /** Only emit `.d.ts` declaration files. Defaults to `false`. */
+ emitDeclarationOnly?: boolean;
+ /** Emit design-type metadata for decorated declarations in source. See issue
+ * [microsoft/TypeScript#2577](https://github.com/Microsoft/TypeScript/issues/2577)
+ * for details. Defaults to `false`. */
+ emitDecoratorMetadata?: boolean;
+ /** Emit `__importStar` and `__importDefault` helpers for runtime babel
+ * ecosystem compatibility and enable `allowSyntheticDefaultImports` for type
+ * system compatibility. Defaults to `true`. */
+ esModuleInterop?: boolean;
+ /** Enables experimental support for ES decorators. Defaults to `false`. */
+ experimentalDecorators?: boolean;
+ /** Emit a single file with source maps instead of having a separate file.
+ * Defaults to `false`. */
+ inlineSourceMap?: boolean;
+ /** Emit the source alongside the source maps within a single file; requires
+ * `inlineSourceMap` or `sourceMap` to be set. Defaults to `false`. */
+ inlineSources?: boolean;
+ /** Perform additional checks to ensure that transpile only would be safe.
+ * Defaults to `false`. */
+ isolatedModules?: boolean;
+ /** Support JSX in `.tsx` files: `"react"`, `"preserve"`, `"react-native"`.
+ * Defaults to `"react"`. */
+ jsx?: "react" | "preserve" | "react-native";
+ /** Specify the JSX factory function to use when targeting react JSX emit,
+ * e.g. `React.createElement` or `h`. Defaults to `React.createElement`. */
+ jsxFactory?: string;
+ /** Resolve keyof to string valued property names only (no numbers or
+ * symbols). Defaults to `false`. */
+ keyofStringsOnly?: string;
+ /** Emit class fields with ECMAScript-standard semantics. Defaults to `false`.
+ * Does not apply to `"esnext"` target. */
+ useDefineForClassFields?: boolean;
+ /** List of library files to be included in the compilation. If omitted,
+ * then the Deno main runtime libs are used. */
+ lib?: string[];
+ /** The locale to use to show error messages. */
+ locale?: string;
+ /** Specifies the location where debugger should locate map files instead of
+ * generated locations. Use this flag if the `.map` files will be located at
+ * run-time in a different location than the `.js` files. The location
+ * specified will be embedded in the source map to direct the debugger where
+ * the map files will be located. Defaults to `undefined`. */
+ mapRoot?: string;
+ /** Specify the module format for the emitted code. Defaults to
+ * `"esnext"`. */
+ module?:
+ | "none"
+ | "commonjs"
+ | "amd"
+ | "system"
+ | "umd"
+ | "es6"
+ | "es2015"
+ | "esnext";
+ /** Do not generate custom helper functions like `__extends` in compiled
+ * output. Defaults to `false`. */
+ noEmitHelpers?: boolean;
+ /** Report errors for fallthrough cases in switch statement. Defaults to
+ * `false`. */
+ noFallthroughCasesInSwitch?: boolean;
+ /** Raise error on expressions and declarations with an implied any type.
+ * Defaults to `true`. */
+ noImplicitAny?: boolean;
+ /** Report an error when not all code paths in function return a value.
+ * Defaults to `false`. */
+ noImplicitReturns?: boolean;
+ /** Raise error on `this` expressions with an implied `any` type. Defaults to
+ * `true`. */
+ noImplicitThis?: boolean;
+ /** Do not emit `"use strict"` directives in module output. Defaults to
+ * `false`. */
+ noImplicitUseStrict?: boolean;
+ /** Do not add triple-slash references or module import targets to the list of
+ * compiled files. Defaults to `false`. */
+ noResolve?: boolean;
+ /** Disable strict checking of generic signatures in function types. Defaults
+ * to `false`. */
+ noStrictGenericChecks?: boolean;
+ /** Report errors on unused locals. Defaults to `false`. */
+ noUnusedLocals?: boolean;
+ /** Report errors on unused parameters. Defaults to `false`. */
+ noUnusedParameters?: boolean;
+ /** Redirect output structure to the directory. This only impacts
+ * `Deno.compile` and only changes the emitted file names. Defaults to
+ * `undefined`. */
+ outDir?: string;
+ /** List of path mapping entries for module names to locations relative to the
+ * `baseUrl`. Defaults to `undefined`. */
+ paths?: Record<string, string[]>;
+ /** Do not erase const enum declarations in generated code. Defaults to
+ * `false`. */
+ preserveConstEnums?: boolean;
+ /** Remove all comments except copy-right header comments beginning with
+ * `/*!`. Defaults to `true`. */
+ removeComments?: boolean;
+ /** Include modules imported with `.json` extension. Defaults to `true`. */
+ resolveJsonModule?: boolean;
+ /** Specifies the root directory of input files. Only use to control the
+ * output directory structure with `outDir`. Defaults to `undefined`. */
+ rootDir?: string;
+ /** List of _root_ folders whose combined content represent the structure of
+ * the project at runtime. Defaults to `undefined`. */
+ rootDirs?: string[];
+ /** Generates corresponding `.map` file. Defaults to `false`. */
+ sourceMap?: boolean;
+ /** Specifies the location where debugger should locate TypeScript files
+ * instead of source locations. Use this flag if the sources will be located
+ * at run-time in a different location than that at design-time. The location
+ * specified will be embedded in the sourceMap to direct the debugger where
+ * the source files will be located. Defaults to `undefined`. */
+ sourceRoot?: string;
+ /** Enable all strict type checking options. Enabling `strict` enables
+ * `noImplicitAny`, `noImplicitThis`, `alwaysStrict`, `strictBindCallApply`,
+ * `strictNullChecks`, `strictFunctionTypes` and
+ * `strictPropertyInitialization`. Defaults to `true`. */
+ strict?: boolean;
+ /** Enable stricter checking of the `bind`, `call`, and `apply` methods on
+ * functions. Defaults to `true`. */
+ strictBindCallApply?: boolean;
+ /** Disable bivariant parameter checking for function types. Defaults to
+ * `true`. */
+ strictFunctionTypes?: boolean;
+ /** Ensure non-undefined class properties are initialized in the constructor.
+ * This option requires `strictNullChecks` be enabled in order to take effect.
+ * Defaults to `true`. */
+ strictPropertyInitialization?: boolean;
+ /** In strict null checking mode, the `null` and `undefined` values are not in
+ * the domain of every type and are only assignable to themselves and `any`
+ * (the one exception being that `undefined` is also assignable to `void`). */
+ strictNullChecks?: boolean;
+ /** Suppress excess property checks for object literals. Defaults to
+ * `false`. */
+ suppressExcessPropertyErrors?: boolean;
+ /** Suppress `noImplicitAny` errors for indexing objects lacking index
+ * signatures. */
+ suppressImplicitAnyIndexErrors?: boolean;
+ /** Specify ECMAScript target version. Defaults to `esnext`. */
+ target?:
+ | "es3"
+ | "es5"
+ | "es6"
+ | "es2015"
+ | "es2016"
+ | "es2017"
+ | "es2018"
+ | "es2019"
+ | "es2020"
+ | "esnext";
+ /** List of names of type definitions to include. Defaults to `undefined`.
+ *
+ * The type definitions are resolved according to the normal Deno resolution
+ * irrespective of if sources are provided on the call. Like other Deno
+ * modules, there is no "magical" resolution. For example:
+ *
+ * ```ts
+ * Deno.compile(
+ * "./foo.js",
+ * undefined,
+ * {
+ * types: [ "./foo.d.ts", "https://deno.land/x/example/types.d.ts" ]
+ * }
+ * );
+ * ```
+ */
+ types?: string[];
+ }
+
+ /** **UNSTABLE**: new API, yet to be vetted.
+ *
+ * The results of a transpile only command, where the `source` contains the
+ * emitted source, and `map` optionally contains the source map. */
+ export interface TranspileOnlyResult {
+ source: string;
+ map?: string;
+ }
+
+ /** **UNSTABLE**: new API, yet to be vetted.
+ *
+ * Takes a set of TypeScript sources and resolves to a map where the key was
+ * the original file name provided in sources and the result contains the
+ * `source` and optionally the `map` from the transpile operation. This does no
+ * type checking and validation, it effectively "strips" the types from the
+ * file.
+ *
+ * ```ts
+ * const results = await Deno.transpileOnly({
+ * "foo.ts": `const foo: string = "foo";`
+ * });
+ * ```
+ *
+ * @param sources A map where the key is the filename and the value is the text
+ * to transpile. The filename is only used in the transpile and
+ * not resolved, for example to fill in the source name in the
+ * source map.
+ * @param options An option object of options to send to the compiler. This is
+ * a subset of ts.CompilerOptions which can be supported by Deno.
+ * Many of the options related to type checking and emitting
+ * type declaration files will have no impact on the output.
+ */
+ export function transpileOnly(
+ sources: Record<string, string>,
+ options?: CompilerOptions,
+ ): Promise<Record<string, TranspileOnlyResult>>;
+
+ /** **UNSTABLE**: new API, yet to be vetted.
+ *
+ * Takes a root module name, and optionally a record set of sources. Resolves
+ * with a compiled set of modules and possibly diagnostics if the compiler
+ * encountered any issues. If just a root name is provided, the modules
+ * will be resolved as if the root module had been passed on the command line.
+ *
+ * If sources are passed, all modules will be resolved out of this object, where
+ * the key is the module name and the value is the content. The extension of
+ * the module name will be used to determine the media type of the module.
+ *
+ * ```ts
+ * const [ maybeDiagnostics1, output1 ] = await Deno.compile("foo.ts");
+ *
+ * const [ maybeDiagnostics2, output2 ] = await Deno.compile("/foo.ts", {
+ * "/foo.ts": `export * from "./bar.ts";`,
+ * "/bar.ts": `export const bar = "bar";`
+ * });
+ * ```
+ *
+ * @param rootName The root name of the module which will be used as the
+ * "starting point". If no `sources` is specified, Deno will
+ * resolve the module externally as if the `rootName` had been
+ * specified on the command line.
+ * @param sources An optional key/value map of sources to be used when resolving
+ * modules, where the key is the module name, and the value is
+ * the source content. The extension of the key will determine
+ * the media type of the file when processing. If supplied,
+ * Deno will not attempt to resolve any modules externally.
+ * @param options An optional object of options to send to the compiler. This is
+ * a subset of ts.CompilerOptions which can be supported by Deno.
+ */
+ export function compile(
+ rootName: string,
+ sources?: Record<string, string>,
+ options?: CompilerOptions,
+ ): Promise<[DiagnosticItem[] | undefined, Record<string, string>]>;
+
+ /** **UNSTABLE**: new API, yet to be vetted.
+ *
+ * `bundle()` is part the compiler API. A full description of this functionality
+ * can be found in the [manual](https://deno.land/manual/runtime/compiler_apis#denobundle).
+ *
+ * Takes a root module name, and optionally a record set of sources. Resolves
+ * with a single JavaScript string (and bundle diagnostics if issues arise with
+ * the bundling) that is like the output of a `deno bundle` command. If just
+ * a root name is provided, the modules will be resolved as if the root module
+ * had been passed on the command line.
+ *
+ * If sources are passed, all modules will be resolved out of this object, where
+ * the key is the module name and the value is the content. The extension of the
+ * module name will be used to determine the media type of the module.
+ *
+ * ```ts
+ * // equivalent to "deno bundle foo.ts" from the command line
+ * const [ maybeDiagnostics1, output1 ] = await Deno.bundle("foo.ts");
+ *
+ * const [ maybeDiagnostics2, output2 ] = await Deno.bundle("/foo.ts", {
+ * "/foo.ts": `export * from "./bar.ts";`,
+ * "/bar.ts": `export const bar = "bar";`
+ * });
+ * ```
+ *
+ * @param rootName The root name of the module which will be used as the
+ * "starting point". If no `sources` is specified, Deno will
+ * resolve the module externally as if the `rootName` had been
+ * specified on the command line.
+ * @param sources An optional key/value map of sources to be used when resolving
+ * modules, where the key is the module name, and the value is
+ * the source content. The extension of the key will determine
+ * the media type of the file when processing. If supplied,
+ * Deno will not attempt to resolve any modules externally.
+ * @param options An optional object of options to send to the compiler. This is
+ * a subset of ts.CompilerOptions which can be supported by Deno.
+ */
+ export function bundle(
+ rootName: string,
+ sources?: Record<string, string>,
+ options?: CompilerOptions,
+ ): Promise<[DiagnosticItem[] | undefined, string]>;
+
+ /** **UNSTABLE**: Should not have same name as `window.location` type. */
+ interface Location {
+ /** The full url for the module, e.g. `file://some/file.ts` or
+ * `https://some/file.ts`. */
+ fileName: string;
+ /** The line number in the file. It is assumed to be 1-indexed. */
+ lineNumber: number;
+ /** The column number in the file. It is assumed to be 1-indexed. */
+ columnNumber: number;
+ }
+
+ /** **UNSTABLE**: new API, yet to be vetted.
+ *
+ * Given a current location in a module, lookup the source location and return
+ * it.
+ *
+ * When Deno transpiles code, it keep source maps of the transpiled code. This
+ * function can be used to lookup the original location. This is
+ * automatically done when accessing the `.stack` of an error, or when an
+ * uncaught error is logged. This function can be used to perform the lookup
+ * for creating better error handling.
+ *
+ * **Note:** `line` and `column` are 1 indexed, which matches display
+ * expectations, but is not typical of most index numbers in Deno.
+ *
+ * An example:
+ *
+ * ```ts
+ * const orig = Deno.applySourceMap({
+ * fileName: "file://my/module.ts",
+ * lineNumber: 5,
+ * columnNumber: 15
+ * });
+ * console.log(`${orig.filename}:${orig.line}:${orig.column}`);
+ * ```
+ */
+ export function applySourceMap(location: Location): Location;
+
+ enum LinuxSignal {
+ SIGHUP = 1,
+ SIGINT = 2,
+ SIGQUIT = 3,
+ SIGILL = 4,
+ SIGTRAP = 5,
+ SIGABRT = 6,
+ SIGBUS = 7,
+ SIGFPE = 8,
+ SIGKILL = 9,
+ SIGUSR1 = 10,
+ SIGSEGV = 11,
+ SIGUSR2 = 12,
+ SIGPIPE = 13,
+ SIGALRM = 14,
+ SIGTERM = 15,
+ SIGSTKFLT = 16,
+ SIGCHLD = 17,
+ SIGCONT = 18,
+ SIGSTOP = 19,
+ SIGTSTP = 20,
+ SIGTTIN = 21,
+ SIGTTOU = 22,
+ SIGURG = 23,
+ SIGXCPU = 24,
+ SIGXFSZ = 25,
+ SIGVTALRM = 26,
+ SIGPROF = 27,
+ SIGWINCH = 28,
+ SIGIO = 29,
+ SIGPWR = 30,
+ SIGSYS = 31,
+ }
+ enum MacOSSignal {
+ SIGHUP = 1,
+ SIGINT = 2,
+ SIGQUIT = 3,
+ SIGILL = 4,
+ SIGTRAP = 5,
+ SIGABRT = 6,
+ SIGEMT = 7,
+ SIGFPE = 8,
+ SIGKILL = 9,
+ SIGBUS = 10,
+ SIGSEGV = 11,
+ SIGSYS = 12,
+ SIGPIPE = 13,
+ SIGALRM = 14,
+ SIGTERM = 15,
+ SIGURG = 16,
+ SIGSTOP = 17,
+ SIGTSTP = 18,
+ SIGCONT = 19,
+ SIGCHLD = 20,
+ SIGTTIN = 21,
+ SIGTTOU = 22,
+ SIGIO = 23,
+ SIGXCPU = 24,
+ SIGXFSZ = 25,
+ SIGVTALRM = 26,
+ SIGPROF = 27,
+ SIGWINCH = 28,
+ SIGINFO = 29,
+ SIGUSR1 = 30,
+ SIGUSR2 = 31,
+ }
+
+ /** **UNSTABLE**: Further changes required to make platform independent.
+ *
+ * Signals numbers. This is platform dependent. */
+ export const Signal: typeof MacOSSignal | typeof LinuxSignal;
+
+ /** **UNSTABLE**: new API, yet to be vetted.
+ *
+ * Represents the stream of signals, implements both `AsyncIterator` and
+ * `PromiseLike`. */
+ export class SignalStream
+ implements AsyncIterableIterator<void>, PromiseLike<void> {
+ constructor(signal: typeof Deno.Signal);
+ then<T, S>(
+ f: (v: void) => T | Promise<T>,
+ g?: (v: void) => S | Promise<S>,
+ ): Promise<T | S>;
+ next(): Promise<IteratorResult<void>>;
+ [Symbol.asyncIterator](): AsyncIterableIterator<void>;
+ dispose(): void;
+ }
+
+ /** **UNSTABLE**: new API, yet to be vetted.
+ *
+ * Returns the stream of the given signal number. You can use it as an async
+ * iterator.
+ *
+ * ```ts
+ * for await (const _ of Deno.signal(Deno.Signal.SIGTERM)) {
+ * console.log("got SIGTERM!");
+ * }
+ * ```
+ *
+ * You can also use it as a promise. In this case you can only receive the
+ * first one.
+ *
+ * ```ts
+ * await Deno.signal(Deno.Signal.SIGTERM);
+ * console.log("SIGTERM received!")
+ * ```
+ *
+ * If you want to stop receiving the signals, you can use `.dispose()` method
+ * of the signal stream object.
+ *
+ * ```ts
+ * const sig = Deno.signal(Deno.Signal.SIGTERM);
+ * setTimeout(() => { sig.dispose(); }, 5000);
+ * for await (const _ of sig) {
+ * console.log("SIGTERM!")
+ * }
+ * ```
+ *
+ * The above for-await loop exits after 5 seconds when `sig.dispose()` is
+ * called.
+ *
+ * NOTE: This functionality is not yet implemented on Windows.
+ */
+ export function signal(signo: number): SignalStream;
+
+ /** **UNSTABLE**: new API, yet to be vetted. */
+ export const signals: {
+ /** Returns the stream of SIGALRM signals.
+ *
+ * This method is the shorthand for `Deno.signal(Deno.Signal.SIGALRM)`. */
+ alarm: () => SignalStream;
+ /** Returns the stream of SIGCHLD signals.
+ *
+ * This method is the shorthand for `Deno.signal(Deno.Signal.SIGCHLD)`. */
+ child: () => SignalStream;
+ /** Returns the stream of SIGHUP signals.
+ *
+ * This method is the shorthand for `Deno.signal(Deno.Signal.SIGHUP)`. */
+ hungup: () => SignalStream;
+ /** Returns the stream of SIGINT signals.
+ *
+ * This method is the shorthand for `Deno.signal(Deno.Signal.SIGINT)`. */
+ interrupt: () => SignalStream;
+ /** Returns the stream of SIGIO signals.
+ *
+ * This method is the shorthand for `Deno.signal(Deno.Signal.SIGIO)`. */
+ io: () => SignalStream;
+ /** Returns the stream of SIGPIPE signals.
+ *
+ * This method is the shorthand for `Deno.signal(Deno.Signal.SIGPIPE)`. */
+ pipe: () => SignalStream;
+ /** Returns the stream of SIGQUIT signals.
+ *
+ * This method is the shorthand for `Deno.signal(Deno.Signal.SIGQUIT)`. */
+ quit: () => SignalStream;
+ /** Returns the stream of SIGTERM signals.
+ *
+ * This method is the shorthand for `Deno.signal(Deno.Signal.SIGTERM)`. */
+ terminate: () => SignalStream;
+ /** Returns the stream of SIGUSR1 signals.
+ *
+ * This method is the shorthand for `Deno.signal(Deno.Signal.SIGUSR1)`. */
+ userDefined1: () => SignalStream;
+ /** Returns the stream of SIGUSR2 signals.
+ *
+ * This method is the shorthand for `Deno.signal(Deno.Signal.SIGUSR2)`. */
+ userDefined2: () => SignalStream;
+ /** Returns the stream of SIGWINCH signals.
+ *
+ * This method is the shorthand for `Deno.signal(Deno.Signal.SIGWINCH)`. */
+ windowChange: () => SignalStream;
+ };
+
+ /** **UNSTABLE**: new API, yet to be vetted
+ *
+ * Set TTY to be under raw mode or not. In raw mode, characters are read and
+ * returned as is, without being processed. All special processing of
+ * characters by the terminal is disabled, including echoing input characters.
+ * Reading from a TTY device in raw mode is faster than reading from a TTY
+ * device in canonical mode.
+ *
+ * ```ts
+ * Deno.setRaw(myTTY.rid, true);
+ * ```
+ */
+ export function setRaw(rid: number, mode: boolean): void;
+
+ /** **UNSTABLE**: needs investigation into high precision time.
+ *
+ * Synchronously changes the access (`atime`) and modification (`mtime`) times
+ * of a file system object referenced by `path`. Given times are either in
+ * seconds (UNIX epoch time) or as `Date` objects.
+ *
+ * ```ts
+ * Deno.utimeSync("myfile.txt", 1556495550, new Date());
+ * ```
+ *
+ * Requires `allow-write` permission. */
+ export function utimeSync(
+ path: string,
+ atime: number | Date,
+ mtime: number | Date,
+ ): void;
+
+ /** **UNSTABLE**: needs investigation into high precision time.
+ *
+ * Changes the access (`atime`) and modification (`mtime`) times of a file
+ * system object referenced by `path`. Given times are either in seconds
+ * (UNIX epoch time) or as `Date` objects.
+ *
+ * ```ts
+ * await Deno.utime("myfile.txt", 1556495550, new Date());
+ * ```
+ *
+ * Requires `allow-write` permission. */
+ export function utime(
+ path: string,
+ atime: number | Date,
+ mtime: number | Date,
+ ): Promise<void>;
+
+ /** **UNSTABLE**: Under consideration to remove `ShutdownMode` entirely.
+ *
+ * Corresponds to `SHUT_RD`, `SHUT_WR`, `SHUT_RDWR` on POSIX-like systems.
+ *
+ * See: http://man7.org/linux/man-pages/man2/shutdown.2.html */
+ export enum ShutdownMode {
+ Read = 0,
+ Write,
+ ReadWrite, // TODO(ry) panics on ReadWrite.
+ }
+
+ /** **UNSTABLE**: Both the `how` parameter and `ShutdownMode` enum are under
+ * consideration for removal.
+ *
+ * Shutdown socket send and receive operations.
+ *
+ * Matches behavior of POSIX shutdown(3).
+ *
+ * ```ts
+ * const listener = Deno.listen({ port: 80 });
+ * const conn = await listener.accept();
+ * Deno.shutdown(conn.rid, Deno.ShutdownMode.Write);
+ * ```
+ */
+ export function shutdown(rid: number, how: ShutdownMode): Promise<void>;
+
+ /** **UNSTABLE**: new API, yet to be vetted.
+ *
+ * A generic transport listener for message-oriented protocols. */
+ export interface DatagramConn extends AsyncIterable<[Uint8Array, Addr]> {
+ /** **UNSTABLE**: new API, yet to be vetted.
+ *
+ * Waits for and resolves to the next message to the `UDPConn`. */
+ receive(p?: Uint8Array): Promise<[Uint8Array, Addr]>;
+ /** UNSTABLE: new API, yet to be vetted.
+ *
+ * Sends a message to the target. */
+ send(p: Uint8Array, addr: Addr): Promise<number>;
+ /** UNSTABLE: new API, yet to be vetted.
+ *
+ * Close closes the socket. Any pending message promises will be rejected
+ * with errors. */
+ close(): void;
+ /** Return the address of the `UDPConn`. */
+ readonly addr: Addr;
+ [Symbol.asyncIterator](): AsyncIterableIterator<[Uint8Array, Addr]>;
+ }
+
+ export interface UnixListenOptions {
+ /** A Path to the Unix Socket. */
+ path: string;
+ }
+
+ /** **UNSTABLE**: new API, yet to be vetted.
+ *
+ * Listen announces on the local transport address.
+ *
+ * ```ts
+ * const listener = Deno.listen({ path: "/foo/bar.sock", transport: "unix" })
+ * ```
+ *
+ * Requires `allow-read` and `allow-write` permission. */
+ export function listen(
+ options: UnixListenOptions & { transport: "unix" },
+ ): Listener;
+
+ /** **UNSTABLE**: new API, yet to be vetted
+ *
+ * Listen announces on the local transport address.
+ *
+ * ```ts
+ * const listener1 = Deno.listenDatagram({
+ * port: 80,
+ * transport: "udp"
+ * });
+ * const listener2 = Deno.listenDatagram({
+ * hostname: "golang.org",
+ * port: 80,
+ * transport: "udp"
+ * });
+ * ```
+ *
+ * Requires `allow-net` permission. */
+ export function listenDatagram(
+ options: ListenOptions & { transport: "udp" },
+ ): DatagramConn;
+
+ /** **UNSTABLE**: new API, yet to be vetted
+ *
+ * Listen announces on the local transport address.
+ *
+ * ```ts
+ * const listener = Deno.listenDatagram({
+ * address: "/foo/bar.sock",
+ * transport: "unixpacket"
+ * });
+ * ```
+ *
+ * Requires `allow-read` and `allow-write` permission. */
+ export function listenDatagram(
+ options: UnixListenOptions & { transport: "unixpacket" },
+ ): DatagramConn;
+
+ export interface UnixConnectOptions {
+ transport: "unix";
+ path: string;
+ }
+
+ /** **UNSTABLE**: The unix socket transport is unstable as a new API yet to
+ * be vetted. The TCP transport is considered stable.
+ *
+ * Connects to the hostname (default is "127.0.0.1") and port on the named
+ * transport (default is "tcp"), and resolves to the connection (`Conn`).
+ *
+ * ```ts
+ * const conn1 = await Deno.connect({ port: 80 });
+ * const conn2 = await Deno.connect({ hostname: "192.0.2.1", port: 80 });
+ * const conn3 = await Deno.connect({ hostname: "[2001:db8::1]", port: 80 });
+ * const conn4 = await Deno.connect({ hostname: "golang.org", port: 80, transport: "tcp" });
+ * const conn5 = await Deno.connect({ path: "/foo/bar.sock", transport: "unix" });
+ * ```
+ *
+ * Requires `allow-net` permission for "tcp" and `allow-read` for "unix". */
+ export function connect(
+ options: ConnectOptions | UnixConnectOptions,
+ ): Promise<Conn>;
+
+ export interface StartTlsOptions {
+ /** A literal IP address or host name that can be resolved to an IP address.
+ * If not specified, defaults to `127.0.0.1`. */
+ hostname?: string;
+ /** Server certificate file. */
+ certFile?: string;
+ }
+
+ /** **UNSTABLE**: new API, yet to be vetted.
+ *
+ * Start TLS handshake from an existing connection using
+ * an optional cert file, hostname (default is "127.0.0.1"). The
+ * cert file is optional and if not included Mozilla's root certificates will
+ * be used (see also https://github.com/ctz/webpki-roots for specifics)
+ * Using this function requires that the other end of the connection is
+ * prepared for TLS handshake.
+ *
+ * ```ts
+ * const conn = await Deno.connect({ port: 80, hostname: "127.0.0.1" });
+ * const tlsConn = await Deno.startTls(conn, { certFile: "./certs/my_custom_root_CA.pem", hostname: "127.0.0.1", port: 80 });
+ * ```
+ *
+ * Requires `allow-net` permission.
+ */
+ export function startTls(
+ conn: Conn,
+ options?: StartTlsOptions,
+ ): Promise<Conn>;
+
+ /** **UNSTABLE**: The `signo` argument may change to require the Deno.Signal
+ * enum.
+ *
+ * Send a signal to process under given `pid`. This functionality currently
+ * only works on Linux and Mac OS.
+ *
+ * If `pid` is negative, the signal will be sent to the process group
+ * identified by `pid`.
+ *
+ * const p = Deno.run({
+ * cmd: ["python", "-c", "from time import sleep; sleep(10000)"]
+ * });
+ *
+ * Deno.kill(p.pid, Deno.Signal.SIGINT);
+ *
+ * Requires `allow-run` permission. */
+ export function kill(pid: number, signo: number): void;
+
+ /** The name of a "powerful feature" which needs permission.
+ *
+ * See: https://w3c.github.io/permissions/#permission-registry
+ *
+ * Note that the definition of `PermissionName` in the above spec is swapped
+ * out for a set of Deno permissions which are not web-compatible. */
+ export type PermissionName =
+ | "run"
+ | "read"
+ | "write"
+ | "net"
+ | "env"
+ | "plugin"
+ | "hrtime";
+
+ /** The current status of the permission.
+ *
+ * See: https://w3c.github.io/permissions/#status-of-a-permission */
+ export type PermissionState = "granted" | "denied" | "prompt";
+
+ export interface RunPermissionDescriptor {
+ name: "run";
+ }
+
+ export interface ReadPermissionDescriptor {
+ name: "read";
+ path?: string;
+ }
+
+ export interface WritePermissionDescriptor {
+ name: "write";
+ path?: string;
+ }
+
+ export interface NetPermissionDescriptor {
+ name: "net";
+ /** Optional url associated with this descriptor.
+ *
+ * If specified: must be a valid url. Expected format: <scheme>://<host_or_ip>[:port][/path]
+ * If the scheme is unknown, callers should specify some scheme, such as x:// na:// unknown://
+ *
+ * See: https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml */
+ url?: string;
+ }
+
+ export interface EnvPermissionDescriptor {
+ name: "env";
+ }
+
+ export interface PluginPermissionDescriptor {
+ name: "plugin";
+ }
+
+ export interface HrtimePermissionDescriptor {
+ name: "hrtime";
+ }
+
+ /** Permission descriptors which define a permission and can be queried,
+ * requested, or revoked.
+ *
+ * See: https://w3c.github.io/permissions/#permission-descriptor */
+ export type PermissionDescriptor =
+ | RunPermissionDescriptor
+ | ReadPermissionDescriptor
+ | WritePermissionDescriptor
+ | NetPermissionDescriptor
+ | EnvPermissionDescriptor
+ | PluginPermissionDescriptor
+ | HrtimePermissionDescriptor;
+
+ export class Permissions {
+ /** Resolves to the current status of a permission.
+ *
+ * ```ts
+ * const status = await Deno.permissions.query({ name: "read", path: "/etc" });
+ * if (status.state === "granted") {
+ * data = await Deno.readFile("/etc/passwd");
+ * }
+ * ```
+ */
+ query(desc: PermissionDescriptor): Promise<PermissionStatus>;
+
+ /** Revokes a permission, and resolves to the state of the permission.
+ *
+ * const status = await Deno.permissions.revoke({ name: "run" });
+ * assert(status.state !== "granted")
+ */
+ revoke(desc: PermissionDescriptor): Promise<PermissionStatus>;
+
+ /** Requests the permission, and resolves to the state of the permission.
+ *
+ * ```ts
+ * const status = await Deno.permissions.request({ name: "env" });
+ * if (status.state === "granted") {
+ * console.log(Deno.dir("home");
+ * } else {
+ * console.log("'env' permission is denied.");
+ * }
+ * ```
+ */
+ request(desc: PermissionDescriptor): Promise<PermissionStatus>;
+ }
+
+ /** **UNSTABLE**: Under consideration to move to `navigator.permissions` to
+ * match web API. It could look like `navigator.permissions.query({ name: Deno.symbols.read })`.
+ */
+ export const permissions: Permissions;
+
+ /** see: https://w3c.github.io/permissions/#permissionstatus */
+ export class PermissionStatus {
+ state: PermissionState;
+ constructor(state: PermissionState);
+ }
+
+ /** **UNSTABLE**: New API, yet to be vetted. Additional consideration is still
+ * necessary around the permissions required.
+ *
+ * Get the `hostname` of the machine the Deno process is running on.
+ *
+ * ```ts
+ * console.log(Deno.hostname());
+ * ```
+ *
+ * Requires `allow-env` permission.
+ */
+ export function hostname(): string;
+
+ /** **UNSTABLE**: The URL of the file that was originally executed from the command-line. */
+ export const mainModule: string;
+
+ /** **UNSTABLE**: new API, yet to be vetted.
+ * Synchronously truncates or extends the specified file stream, to reach the
+ * specified `len`. If `len` is not specified then the entire file contents
+ * are truncated.
+ *
+ * ```ts
+ * // truncate the entire file
+ * const file = Deno.open("my_file.txt", { read: true, write: true, truncate: true, create: true });
+ * Deno.ftruncateSync(file.rid);
+ *
+ * // truncate part of the file
+ * const file = Deno.open("my_file.txt", { read: true, write: true, create: true });
+ * Deno.write(file.rid, new TextEncoder().encode("Hello World"));
+ * Deno.ftruncateSync(file.rid, 7);
+ * const data = new Uint8Array(32);
+ * Deno.readSync(file.rid, data);
+ * console.log(new TextDecoder().decode(data)); // Hello W
+ * ```
+ */
+ export function ftruncateSync(rid: number, len?: number): void;
+
+ /** **UNSTABLE**: new API, yet to be vetted.
+ * Truncates or extends the specified file stream, to reach the specified `len`. If
+ * `len` is not specified then the entire file contents are truncated.
+ *
+ * ```ts
+ * // truncate the entire file
+ * const file = Deno.open("my_file.txt", { read: true, write: true, create: true });
+ * await Deno.ftruncate(file.rid);
+ *
+ * // truncate part of the file
+ * const file = Deno.open("my_file.txt", { read: true, write: true, create: true });
+ * await Deno.write(file.rid, new TextEncoder().encode("Hello World"));
+ * await Deno.ftruncate(file.rid, 7);
+ * const data = new Uint8Array(32);
+ * await Deno.read(file.rid, data);
+ * console.log(new TextDecoder().decode(data)); // Hello W
+ * ```
+ */
+ export function ftruncate(rid: number, len?: number): Promise<void>;
+
+ /* **UNSTABLE**: New API, yet to be vetted.
+ * Synchronously flushes any pending data operations of the given file stream to disk.
+ * ```ts
+ * const file = Deno.openSync("my_file.txt", { read: true, write: true, create: true });
+ * Deno.writeSync(file.rid, new TextEncoder().encode("Hello World"));
+ * Deno.fdatasyncSync(file.rid);
+ * console.log(new TextDecoder().decode(Deno.readFileSync("my_file.txt"))); // Hello World
+ * ```
+ */
+ export function fdatasyncSync(rid: number): void;
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ * Flushes any pending data operations of the given file stream to disk.
+ * ```ts
+ * const file = await Deno.open("my_file.txt", { read: true, write: true, create: true });
+ * await Deno.write(file.rid, new TextEncoder().encode("Hello World"));
+ * await Deno.fdatasync(file.rid);
+ * console.log(new TextDecoder().decode(await Deno.readFile("my_file.txt"))); // Hello World
+ * ```
+ */
+ export function fdatasync(rid: number): Promise<void>;
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ * Synchronously flushes any pending data and metadata operations of the given file stream to disk.
+ * ```ts
+ * const file = Deno.openSync("my_file.txt", { read: true, write: true, create: true });
+ * Deno.writeSync(file.rid, new TextEncoder().encode("Hello World"));
+ * Deno.ftruncateSync(file.rid, 1);
+ * Deno.fsyncSync(file.rid);
+ * console.log(new TextDecoder().decode(Deno.readFileSync("my_file.txt"))); // H
+ * ```
+ */
+ export function fsyncSync(rid: number): void;
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ * Flushes any pending data and metadata operations of the given file stream to disk.
+ * ```ts
+ * const file = await Deno.open("my_file.txt", { read: true, write: true, create: true });
+ * await Deno.write(file.rid, new TextEncoder().encode("Hello World"));
+ * await Deno.ftruncate(file.rid, 1);
+ * await Deno.fsync(file.rid);
+ * console.log(new TextDecoder().decode(await Deno.readFile("my_file.txt"))); // H
+ * ```
+ */
+ export function fsync(rid: number): Promise<void>;
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ * Synchronously returns a `Deno.FileInfo` for the given file stream.
+ *
+ * ```ts
+ * const file = Deno.openSync("file.txt", { read: true });
+ * const fileInfo = Deno.fstatSync(file.rid);
+ * assert(fileInfo.isFile);
+ * ```
+ */
+ export function fstatSync(rid: number): FileInfo;
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ * Returns a `Deno.FileInfo` for the given file stream.
+ *
+ * ```ts
+ * const file = await Deno.open("file.txt", { read: true });
+ * const fileInfo = await Deno.fstat(file.rid);
+ * assert(fileInfo.isFile);
+ * ```
+ */
+ export function fstat(rid: number): Promise<FileInfo>;
+
+ /** **UNSTABLE**: New API, yet to be vetted.
+ * The pid of the current process's parent.
+ */
+ export const ppid: number;
+}
diff --git a/cli/dts/lib.deno.window.d.ts b/cli/dts/lib.deno.window.d.ts
new file mode 100644
index 000000000..61c5abf8a
--- /dev/null
+++ b/cli/dts/lib.deno.window.d.ts
@@ -0,0 +1,25 @@
+// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
+
+/* eslint-disable @typescript-eslint/no-explicit-any */
+
+/// <reference no-default-lib="true" />
+/// <reference lib="deno.ns" />
+/// <reference lib="deno.shared_globals" />
+/// <reference lib="esnext" />
+
+declare interface Window extends EventTarget {
+ readonly window: Window & typeof globalThis;
+ readonly self: Window & typeof globalThis;
+ onload: ((this: Window, ev: Event) => any) | null;
+ onunload: ((this: Window, ev: Event) => any) | null;
+ close: () => void;
+ readonly closed: boolean;
+ Deno: typeof Deno;
+}
+
+declare const window: Window & typeof globalThis;
+declare const self: Window & typeof globalThis;
+declare const onload: ((this: Window, ev: Event) => any) | null;
+declare const onunload: ((this: Window, ev: Event) => any) | null;
+
+/* eslint-enable @typescript-eslint/no-explicit-any */
diff --git a/cli/dts/lib.deno.worker.d.ts b/cli/dts/lib.deno.worker.d.ts
new file mode 100644
index 000000000..95aa16139
--- /dev/null
+++ b/cli/dts/lib.deno.worker.d.ts
@@ -0,0 +1,43 @@
+// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
+
+/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any */
+
+/// <reference no-default-lib="true" />
+/// <reference lib="deno.ns" />
+/// <reference lib="deno.shared_globals" />
+/// <reference lib="esnext" />
+
+declare interface DedicatedWorkerGlobalScope {
+ self: DedicatedWorkerGlobalScope & typeof globalThis;
+ onmessage: (e: MessageEvent) => void;
+ onmessageerror: (e: MessageEvent) => void;
+ onerror: undefined | typeof onerror;
+ name: typeof __workerMain.name;
+ close: typeof __workerMain.close;
+ postMessage: typeof __workerMain.postMessage;
+ Deno: typeof Deno;
+}
+
+declare const self: DedicatedWorkerGlobalScope & typeof globalThis;
+declare let onmessage: ((e: { data: any }) => Promise<void> | void) | undefined;
+declare let onerror:
+ | ((
+ msg: string,
+ source: string,
+ lineno: number,
+ colno: number,
+ e: Event,
+ ) => boolean | void)
+ | undefined;
+declare const close: typeof __workerMain.close;
+declare const name: typeof __workerMain.name;
+declare const postMessage: typeof __workerMain.postMessage;
+
+declare namespace __workerMain {
+ export let onmessage: (e: { data: any }) => void;
+ export function postMessage(data: any): void;
+ export function close(): void;
+ export const name: string;
+}
+
+/* eslint-enable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any */
diff --git a/cli/dts/lib.dom.d.ts b/cli/dts/lib.dom.d.ts
new file mode 100644
index 000000000..86c404363
--- /dev/null
+++ b/cli/dts/lib.dom.d.ts
@@ -0,0 +1,20050 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/////////////////////////////
+/// DOM APIs
+/////////////////////////////
+
+interface Account {
+ displayName: string;
+ id: string;
+ imageURL?: string;
+ name?: string;
+ rpDisplayName: string;
+}
+
+interface AddEventListenerOptions extends EventListenerOptions {
+ once?: boolean;
+ passive?: boolean;
+}
+
+interface AesCbcParams extends Algorithm {
+ iv: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer;
+}
+
+interface AesCtrParams extends Algorithm {
+ counter: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer;
+ length: number;
+}
+
+interface AesDerivedKeyParams extends Algorithm {
+ length: number;
+}
+
+interface AesGcmParams extends Algorithm {
+ additionalData?: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer;
+ iv: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer;
+ tagLength?: number;
+}
+
+interface AesKeyAlgorithm extends KeyAlgorithm {
+ length: number;
+}
+
+interface AesKeyGenParams extends Algorithm {
+ length: number;
+}
+
+interface Algorithm {
+ name: string;
+}
+
+interface AnalyserOptions extends AudioNodeOptions {
+ fftSize?: number;
+ maxDecibels?: number;
+ minDecibels?: number;
+ smoothingTimeConstant?: number;
+}
+
+interface AnimationEventInit extends EventInit {
+ animationName?: string;
+ elapsedTime?: number;
+ pseudoElement?: string;
+}
+
+interface AnimationPlaybackEventInit extends EventInit {
+ currentTime?: number | null;
+ timelineTime?: number | null;
+}
+
+interface AssertionOptions {
+ allowList?: ScopedCredentialDescriptor[];
+ extensions?: WebAuthnExtensions;
+ rpId?: string;
+ timeoutSeconds?: number;
+}
+
+interface AssignedNodesOptions {
+ flatten?: boolean;
+}
+
+interface AudioBufferOptions {
+ length: number;
+ numberOfChannels?: number;
+ sampleRate: number;
+}
+
+interface AudioBufferSourceOptions {
+ buffer?: AudioBuffer | null;
+ detune?: number;
+ loop?: boolean;
+ loopEnd?: number;
+ loopStart?: number;
+ playbackRate?: number;
+}
+
+interface AudioContextInfo {
+ currentTime?: number;
+ sampleRate?: number;
+}
+
+interface AudioContextOptions {
+ latencyHint?: AudioContextLatencyCategory | number;
+ sampleRate?: number;
+}
+
+interface AudioNodeOptions {
+ channelCount?: number;
+ channelCountMode?: ChannelCountMode;
+ channelInterpretation?: ChannelInterpretation;
+}
+
+interface AudioParamDescriptor {
+ automationRate?: AutomationRate;
+ defaultValue?: number;
+ maxValue?: number;
+ minValue?: number;
+ name: string;
+}
+
+interface AudioProcessingEventInit extends EventInit {
+ inputBuffer: AudioBuffer;
+ outputBuffer: AudioBuffer;
+ playbackTime: number;
+}
+
+interface AudioTimestamp {
+ contextTime?: number;
+ performanceTime?: number;
+}
+
+interface AudioWorkletNodeOptions extends AudioNodeOptions {
+ numberOfInputs?: number;
+ numberOfOutputs?: number;
+ outputChannelCount?: number[];
+ parameterData?: Record<string, number>;
+ processorOptions?: any;
+}
+
+interface AuthenticationExtensionsClientInputs {
+ appid?: string;
+ authnSel?: AuthenticatorSelectionList;
+ exts?: boolean;
+ loc?: boolean;
+ txAuthGeneric?: txAuthGenericArg;
+ txAuthSimple?: string;
+ uvi?: boolean;
+ uvm?: boolean;
+}
+
+interface AuthenticationExtensionsClientOutputs {
+ appid?: boolean;
+ authnSel?: boolean;
+ exts?: AuthenticationExtensionsSupported;
+ loc?: Coordinates;
+ txAuthGeneric?: ArrayBuffer;
+ txAuthSimple?: string;
+ uvi?: ArrayBuffer;
+ uvm?: UvmEntries;
+}
+
+interface AuthenticatorSelectionCriteria {
+ authenticatorAttachment?: AuthenticatorAttachment;
+ requireResidentKey?: boolean;
+ userVerification?: UserVerificationRequirement;
+}
+
+interface BiquadFilterOptions extends AudioNodeOptions {
+ Q?: number;
+ detune?: number;
+ frequency?: number;
+ gain?: number;
+ type?: BiquadFilterType;
+}
+
+interface BlobPropertyBag {
+ endings?: EndingType;
+ type?: string;
+}
+
+interface ByteLengthChunk {
+ byteLength?: number;
+}
+
+interface CacheQueryOptions {
+ ignoreMethod?: boolean;
+ ignoreSearch?: boolean;
+ ignoreVary?: boolean;
+}
+
+interface CanvasRenderingContext2DSettings {
+ alpha?: boolean;
+ desynchronized?: boolean;
+}
+
+interface ChannelMergerOptions extends AudioNodeOptions {
+ numberOfInputs?: number;
+}
+
+interface ChannelSplitterOptions extends AudioNodeOptions {
+ numberOfOutputs?: number;
+}
+
+interface ClientData {
+ challenge: string;
+ extensions?: WebAuthnExtensions;
+ hashAlg: string | Algorithm;
+ origin: string;
+ rpId: string;
+ tokenBinding?: string;
+}
+
+interface ClientQueryOptions {
+ includeUncontrolled?: boolean;
+ type?: ClientTypes;
+}
+
+interface ClipboardEventInit extends EventInit {
+ clipboardData?: DataTransfer | null;
+}
+
+interface CloseEventInit extends EventInit {
+ code?: number;
+ reason?: string;
+ wasClean?: boolean;
+}
+
+interface CompositionEventInit extends UIEventInit {
+ data?: string;
+}
+
+interface ComputedEffectTiming extends EffectTiming {
+ activeDuration?: number;
+ currentIteration?: number | null;
+ endTime?: number;
+ localTime?: number | null;
+ progress?: number | null;
+}
+
+interface ComputedKeyframe {
+ composite: CompositeOperationOrAuto;
+ computedOffset: number;
+ easing: string;
+ offset: number | null;
+ [property: string]: string | number | null | undefined;
+}
+
+interface ConfirmSiteSpecificExceptionsInformation extends ExceptionInformation {
+ arrayOfDomainStrings?: string[];
+}
+
+interface ConstantSourceOptions {
+ offset?: number;
+}
+
+interface ConstrainBooleanParameters {
+ exact?: boolean;
+ ideal?: boolean;
+}
+
+interface ConstrainDOMStringParameters {
+ exact?: string | string[];
+ ideal?: string | string[];
+}
+
+interface ConstrainDoubleRange extends DoubleRange {
+ exact?: number;
+ ideal?: number;
+}
+
+interface ConstrainULongRange extends ULongRange {
+ exact?: number;
+ ideal?: number;
+}
+
+interface ConstrainVideoFacingModeParameters {
+ exact?: VideoFacingModeEnum | VideoFacingModeEnum[];
+ ideal?: VideoFacingModeEnum | VideoFacingModeEnum[];
+}
+
+interface ConvolverOptions extends AudioNodeOptions {
+ buffer?: AudioBuffer | null;
+ disableNormalization?: boolean;
+}
+
+interface CredentialCreationOptions {
+ publicKey?: PublicKeyCredentialCreationOptions;
+ signal?: AbortSignal;
+}
+
+interface CredentialRequestOptions {
+ mediation?: CredentialMediationRequirement;
+ publicKey?: PublicKeyCredentialRequestOptions;
+ signal?: AbortSignal;
+}
+
+interface CustomEventInit<T = any> extends EventInit {
+ detail?: T;
+}
+
+interface DOMMatrix2DInit {
+ a?: number;
+ b?: number;
+ c?: number;
+ d?: number;
+ e?: number;
+ f?: number;
+ m11?: number;
+ m12?: number;
+ m21?: number;
+ m22?: number;
+ m41?: number;
+ m42?: number;
+}
+
+interface DOMMatrixInit extends DOMMatrix2DInit {
+ is2D?: boolean;
+ m13?: number;
+ m14?: number;
+ m23?: number;
+ m24?: number;
+ m31?: number;
+ m32?: number;
+ m33?: number;
+ m34?: number;
+ m43?: number;
+ m44?: number;
+}
+
+interface DOMPointInit {
+ w?: number;
+ x?: number;
+ y?: number;
+ z?: number;
+}
+
+interface DOMQuadInit {
+ p1?: DOMPointInit;
+ p2?: DOMPointInit;
+ p3?: DOMPointInit;
+ p4?: DOMPointInit;
+}
+
+interface DOMRectInit {
+ height?: number;
+ width?: number;
+ x?: number;
+ y?: number;
+}
+
+interface DelayOptions extends AudioNodeOptions {
+ delayTime?: number;
+ maxDelayTime?: number;
+}
+
+interface DeviceLightEventInit extends EventInit {
+ value?: number;
+}
+
+interface DeviceMotionEventAccelerationInit {
+ x?: number | null;
+ y?: number | null;
+ z?: number | null;
+}
+
+interface DeviceMotionEventInit extends EventInit {
+ acceleration?: DeviceMotionEventAccelerationInit;
+ accelerationIncludingGravity?: DeviceMotionEventAccelerationInit;
+ interval?: number;
+ rotationRate?: DeviceMotionEventRotationRateInit;
+}
+
+interface DeviceMotionEventRotationRateInit {
+ alpha?: number | null;
+ beta?: number | null;
+ gamma?: number | null;
+}
+
+interface DeviceOrientationEventInit extends EventInit {
+ absolute?: boolean;
+ alpha?: number | null;
+ beta?: number | null;
+ gamma?: number | null;
+}
+
+interface DevicePermissionDescriptor extends PermissionDescriptor {
+ deviceId?: string;
+ name: "camera" | "microphone" | "speaker";
+}
+
+interface DocumentTimelineOptions {
+ originTime?: number;
+}
+
+interface DoubleRange {
+ max?: number;
+ min?: number;
+}
+
+interface DragEventInit extends MouseEventInit {
+ dataTransfer?: DataTransfer | null;
+}
+
+interface DynamicsCompressorOptions extends AudioNodeOptions {
+ attack?: number;
+ knee?: number;
+ ratio?: number;
+ release?: number;
+ threshold?: number;
+}
+
+interface EcKeyAlgorithm extends KeyAlgorithm {
+ namedCurve: NamedCurve;
+}
+
+interface EcKeyGenParams extends Algorithm {
+ namedCurve: NamedCurve;
+}
+
+interface EcKeyImportParams extends Algorithm {
+ namedCurve: NamedCurve;
+}
+
+interface EcdhKeyDeriveParams extends Algorithm {
+ public: CryptoKey;
+}
+
+interface EcdsaParams extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+}
+
+interface EffectTiming {
+ delay?: number;
+ direction?: PlaybackDirection;
+ duration?: number | string;
+ easing?: string;
+ endDelay?: number;
+ fill?: FillMode;
+ iterationStart?: number;
+ iterations?: number;
+}
+
+interface ElementCreationOptions {
+ is?: string;
+}
+
+interface ElementDefinitionOptions {
+ extends?: string;
+}
+
+interface ErrorEventInit extends EventInit {
+ colno?: number;
+ error?: any;
+ filename?: string;
+ lineno?: number;
+ message?: string;
+}
+
+interface EventInit {
+ bubbles?: boolean;
+ cancelable?: boolean;
+ composed?: boolean;
+}
+
+interface EventListenerOptions {
+ capture?: boolean;
+}
+
+interface EventModifierInit extends UIEventInit {
+ altKey?: boolean;
+ ctrlKey?: boolean;
+ metaKey?: boolean;
+ modifierAltGraph?: boolean;
+ modifierCapsLock?: boolean;
+ modifierFn?: boolean;
+ modifierFnLock?: boolean;
+ modifierHyper?: boolean;
+ modifierNumLock?: boolean;
+ modifierScrollLock?: boolean;
+ modifierSuper?: boolean;
+ modifierSymbol?: boolean;
+ modifierSymbolLock?: boolean;
+ shiftKey?: boolean;
+}
+
+interface EventSourceInit {
+ withCredentials?: boolean;
+}
+
+interface ExceptionInformation {
+ domain?: string | null;
+}
+
+interface FilePropertyBag extends BlobPropertyBag {
+ lastModified?: number;
+}
+
+interface FocusEventInit extends UIEventInit {
+ relatedTarget?: EventTarget | null;
+}
+
+interface FocusNavigationEventInit extends EventInit {
+ navigationReason?: string | null;
+ originHeight?: number;
+ originLeft?: number;
+ originTop?: number;
+ originWidth?: number;
+}
+
+interface FocusNavigationOrigin {
+ originHeight?: number;
+ originLeft?: number;
+ originTop?: number;
+ originWidth?: number;
+}
+
+interface FocusOptions {
+ preventScroll?: boolean;
+}
+
+interface FullscreenOptions {
+ navigationUI?: FullscreenNavigationUI;
+}
+
+interface GainOptions extends AudioNodeOptions {
+ gain?: number;
+}
+
+interface GamepadEventInit extends EventInit {
+ gamepad: Gamepad;
+}
+
+interface GetNotificationOptions {
+ tag?: string;
+}
+
+interface GetRootNodeOptions {
+ composed?: boolean;
+}
+
+interface HashChangeEventInit extends EventInit {
+ newURL?: string;
+ oldURL?: string;
+}
+
+interface HkdfParams extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+ info: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer;
+ salt: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer;
+}
+
+interface HmacImportParams extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+ length?: number;
+}
+
+interface HmacKeyAlgorithm extends KeyAlgorithm {
+ hash: KeyAlgorithm;
+ length: number;
+}
+
+interface HmacKeyGenParams extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+ length?: number;
+}
+
+interface IDBIndexParameters {
+ multiEntry?: boolean;
+ unique?: boolean;
+}
+
+interface IDBObjectStoreParameters {
+ autoIncrement?: boolean;
+ keyPath?: string | string[] | null;
+}
+
+interface IDBVersionChangeEventInit extends EventInit {
+ newVersion?: number | null;
+ oldVersion?: number;
+}
+
+interface IIRFilterOptions extends AudioNodeOptions {
+ feedback: number[];
+ feedforward: number[];
+}
+
+interface ImageBitmapOptions {
+ colorSpaceConversion?: ColorSpaceConversion;
+ imageOrientation?: ImageOrientation;
+ premultiplyAlpha?: PremultiplyAlpha;
+ resizeHeight?: number;
+ resizeQuality?: ResizeQuality;
+ resizeWidth?: number;
+}
+
+interface ImageBitmapRenderingContextSettings {
+ alpha?: boolean;
+}
+
+interface ImageEncodeOptions {
+ quality?: number;
+ type?: string;
+}
+
+interface InputEventInit extends UIEventInit {
+ data?: string | null;
+ inputType?: string;
+ isComposing?: boolean;
+}
+
+interface IntersectionObserverEntryInit {
+ boundingClientRect: DOMRectInit;
+ intersectionRatio: number;
+ intersectionRect: DOMRectInit;
+ isIntersecting: boolean;
+ rootBounds: DOMRectInit | null;
+ target: Element;
+ time: number;
+}
+
+interface IntersectionObserverInit {
+ root?: Element | null;
+ rootMargin?: string;
+ threshold?: number | number[];
+}
+
+interface JsonWebKey {
+ alg?: string;
+ crv?: string;
+ d?: string;
+ dp?: string;
+ dq?: string;
+ e?: string;
+ ext?: boolean;
+ k?: string;
+ key_ops?: string[];
+ kty?: string;
+ n?: string;
+ oth?: RsaOtherPrimesInfo[];
+ p?: string;
+ q?: string;
+ qi?: string;
+ use?: string;
+ x?: string;
+ y?: string;
+}
+
+interface KeyAlgorithm {
+ name: string;
+}
+
+interface KeyboardEventInit extends EventModifierInit {
+ code?: string;
+ isComposing?: boolean;
+ key?: string;
+ location?: number;
+ repeat?: boolean;
+}
+
+interface Keyframe {
+ composite?: CompositeOperationOrAuto;
+ easing?: string;
+ offset?: number | null;
+ [property: string]: string | number | null | undefined;
+}
+
+interface KeyframeAnimationOptions extends KeyframeEffectOptions {
+ id?: string;
+}
+
+interface KeyframeEffectOptions extends EffectTiming {
+ composite?: CompositeOperation;
+ iterationComposite?: IterationCompositeOperation;
+}
+
+interface MediaElementAudioSourceOptions {
+ mediaElement: HTMLMediaElement;
+}
+
+interface MediaEncryptedEventInit extends EventInit {
+ initData?: ArrayBuffer | null;
+ initDataType?: string;
+}
+
+interface MediaKeyMessageEventInit extends EventInit {
+ message: ArrayBuffer;
+ messageType: MediaKeyMessageType;
+}
+
+interface MediaKeySystemConfiguration {
+ audioCapabilities?: MediaKeySystemMediaCapability[];
+ distinctiveIdentifier?: MediaKeysRequirement;
+ initDataTypes?: string[];
+ label?: string;
+ persistentState?: MediaKeysRequirement;
+ sessionTypes?: string[];
+ videoCapabilities?: MediaKeySystemMediaCapability[];
+}
+
+interface MediaKeySystemMediaCapability {
+ contentType?: string;
+ robustness?: string;
+}
+
+interface MediaQueryListEventInit extends EventInit {
+ matches?: boolean;
+ media?: string;
+}
+
+interface MediaStreamAudioSourceOptions {
+ mediaStream: MediaStream;
+}
+
+interface MediaStreamConstraints {
+ audio?: boolean | MediaTrackConstraints;
+ peerIdentity?: string;
+ video?: boolean | MediaTrackConstraints;
+}
+
+interface MediaStreamErrorEventInit extends EventInit {
+ error?: MediaStreamError | null;
+}
+
+interface MediaStreamEventInit extends EventInit {
+ stream?: MediaStream;
+}
+
+interface MediaStreamTrackAudioSourceOptions {
+ mediaStreamTrack: MediaStreamTrack;
+}
+
+interface MediaStreamTrackEventInit extends EventInit {
+ track: MediaStreamTrack;
+}
+
+interface MediaTrackCapabilities {
+ aspectRatio?: DoubleRange;
+ autoGainControl?: boolean[];
+ channelCount?: ULongRange;
+ deviceId?: string;
+ echoCancellation?: boolean[];
+ facingMode?: string[];
+ frameRate?: DoubleRange;
+ groupId?: string;
+ height?: ULongRange;
+ latency?: DoubleRange;
+ noiseSuppression?: boolean[];
+ resizeMode?: string[];
+ sampleRate?: ULongRange;
+ sampleSize?: ULongRange;
+ width?: ULongRange;
+}
+
+interface MediaTrackConstraintSet {
+ aspectRatio?: ConstrainDouble;
+ autoGainControl?: ConstrainBoolean;
+ channelCount?: ConstrainULong;
+ deviceId?: ConstrainDOMString;
+ echoCancellation?: ConstrainBoolean;
+ facingMode?: ConstrainDOMString;
+ frameRate?: ConstrainDouble;
+ groupId?: ConstrainDOMString;
+ height?: ConstrainULong;
+ latency?: ConstrainDouble;
+ noiseSuppression?: ConstrainBoolean;
+ resizeMode?: ConstrainDOMString;
+ sampleRate?: ConstrainULong;
+ sampleSize?: ConstrainULong;
+ width?: ConstrainULong;
+}
+
+interface MediaTrackConstraints extends MediaTrackConstraintSet {
+ advanced?: MediaTrackConstraintSet[];
+}
+
+interface MediaTrackSettings {
+ aspectRatio?: number;
+ autoGainControl?: boolean;
+ channelCount?: number;
+ deviceId?: string;
+ echoCancellation?: boolean;
+ facingMode?: string;
+ frameRate?: number;
+ groupId?: string;
+ height?: number;
+ latency?: number;
+ noiseSuppression?: boolean;
+ resizeMode?: string;
+ sampleRate?: number;
+ sampleSize?: number;
+ width?: number;
+}
+
+interface MediaTrackSupportedConstraints {
+ aspectRatio?: boolean;
+ autoGainControl?: boolean;
+ channelCount?: boolean;
+ deviceId?: boolean;
+ echoCancellation?: boolean;
+ facingMode?: boolean;
+ frameRate?: boolean;
+ groupId?: boolean;
+ height?: boolean;
+ latency?: boolean;
+ noiseSuppression?: boolean;
+ resizeMode?: boolean;
+ sampleRate?: boolean;
+ sampleSize?: boolean;
+ width?: boolean;
+}
+
+interface MessageEventInit extends EventInit {
+ data?: any;
+ lastEventId?: string;
+ origin?: string;
+ ports?: MessagePort[];
+ source?: MessageEventSource | null;
+}
+
+interface MidiPermissionDescriptor extends PermissionDescriptor {
+ name: "midi";
+ sysex?: boolean;
+}
+
+interface MouseEventInit extends EventModifierInit {
+ button?: number;
+ buttons?: number;
+ clientX?: number;
+ clientY?: number;
+ movementX?: number;
+ movementY?: number;
+ relatedTarget?: EventTarget | null;
+ screenX?: number;
+ screenY?: number;
+}
+
+interface MultiCacheQueryOptions extends CacheQueryOptions {
+ cacheName?: string;
+}
+
+interface MutationObserverInit {
+ /**
+ * Set to a list of attribute local names (without namespace) if not all attribute mutations need to be observed and attributes is true or omitted.
+ */
+ attributeFilter?: string[];
+ /**
+ * Set to true if attributes is true or omitted and target's attribute value before the mutation needs to be recorded.
+ */
+ attributeOldValue?: boolean;
+ /**
+ * Set to true if mutations to target's attributes are to be observed. Can be omitted if attributeOldValue or attributeFilter is specified.
+ */
+ attributes?: boolean;
+ /**
+ * Set to true if mutations to target's data are to be observed. Can be omitted if characterDataOldValue is specified.
+ */
+ characterData?: boolean;
+ /**
+ * Set to true if characterData is set to true or omitted and target's data before the mutation needs to be recorded.
+ */
+ characterDataOldValue?: boolean;
+ /**
+ * Set to true if mutations to target's children are to be observed.
+ */
+ childList?: boolean;
+ /**
+ * Set to true if mutations to not just target, but also target's descendants are to be observed.
+ */
+ subtree?: boolean;
+}
+
+interface NavigationPreloadState {
+ enabled?: boolean;
+ headerValue?: string;
+}
+
+interface NotificationAction {
+ action: string;
+ icon?: string;
+ title: string;
+}
+
+interface NotificationOptions {
+ actions?: NotificationAction[];
+ badge?: string;
+ body?: string;
+ data?: any;
+ dir?: NotificationDirection;
+ icon?: string;
+ image?: string;
+ lang?: string;
+ renotify?: boolean;
+ requireInteraction?: boolean;
+ silent?: boolean;
+ tag?: string;
+ timestamp?: number;
+ vibrate?: VibratePattern;
+}
+
+interface OfflineAudioCompletionEventInit extends EventInit {
+ renderedBuffer: AudioBuffer;
+}
+
+interface OfflineAudioContextOptions {
+ length: number;
+ numberOfChannels?: number;
+ sampleRate: number;
+}
+
+interface OptionalEffectTiming {
+ delay?: number;
+ direction?: PlaybackDirection;
+ duration?: number | string;
+ easing?: string;
+ endDelay?: number;
+ fill?: FillMode;
+ iterationStart?: number;
+ iterations?: number;
+}
+
+interface OscillatorOptions extends AudioNodeOptions {
+ detune?: number;
+ frequency?: number;
+ periodicWave?: PeriodicWave;
+ type?: OscillatorType;
+}
+
+interface PageTransitionEventInit extends EventInit {
+ persisted?: boolean;
+}
+
+interface PannerOptions extends AudioNodeOptions {
+ coneInnerAngle?: number;
+ coneOuterAngle?: number;
+ coneOuterGain?: number;
+ distanceModel?: DistanceModelType;
+ maxDistance?: number;
+ orientationX?: number;
+ orientationY?: number;
+ orientationZ?: number;
+ panningModel?: PanningModelType;
+ positionX?: number;
+ positionY?: number;
+ positionZ?: number;
+ refDistance?: number;
+ rolloffFactor?: number;
+}
+
+interface PaymentCurrencyAmount {
+ currency: string;
+ currencySystem?: string;
+ value: string;
+}
+
+interface PaymentDetailsBase {
+ displayItems?: PaymentItem[];
+ modifiers?: PaymentDetailsModifier[];
+ shippingOptions?: PaymentShippingOption[];
+}
+
+interface PaymentDetailsInit extends PaymentDetailsBase {
+ id?: string;
+ total: PaymentItem;
+}
+
+interface PaymentDetailsModifier {
+ additionalDisplayItems?: PaymentItem[];
+ data?: any;
+ supportedMethods: string | string[];
+ total?: PaymentItem;
+}
+
+interface PaymentDetailsUpdate extends PaymentDetailsBase {
+ error?: string;
+ total?: PaymentItem;
+}
+
+interface PaymentItem {
+ amount: PaymentCurrencyAmount;
+ label: string;
+ pending?: boolean;
+}
+
+interface PaymentMethodData {
+ data?: any;
+ supportedMethods: string | string[];
+}
+
+interface PaymentOptions {
+ requestPayerEmail?: boolean;
+ requestPayerName?: boolean;
+ requestPayerPhone?: boolean;
+ requestShipping?: boolean;
+ shippingType?: string;
+}
+
+interface PaymentRequestUpdateEventInit extends EventInit {
+}
+
+interface PaymentShippingOption {
+ amount: PaymentCurrencyAmount;
+ id: string;
+ label: string;
+ selected?: boolean;
+}
+
+interface Pbkdf2Params extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+ iterations: number;
+ salt: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer;
+}
+
+interface PerformanceObserverInit {
+ buffered?: boolean;
+ entryTypes?: string[];
+ type?: string;
+}
+
+interface PeriodicWaveConstraints {
+ disableNormalization?: boolean;
+}
+
+interface PeriodicWaveOptions extends PeriodicWaveConstraints {
+ imag?: number[] | Float32Array;
+ real?: number[] | Float32Array;
+}
+
+interface PermissionDescriptor {
+ name: PermissionName;
+}
+
+interface PipeOptions {
+ preventAbort?: boolean;
+ preventCancel?: boolean;
+ preventClose?: boolean;
+ signal?: AbortSignal;
+}
+
+interface PointerEventInit extends MouseEventInit {
+ height?: number;
+ isPrimary?: boolean;
+ pointerId?: number;
+ pointerType?: string;
+ pressure?: number;
+ tangentialPressure?: number;
+ tiltX?: number;
+ tiltY?: number;
+ twist?: number;
+ width?: number;
+}
+
+interface PopStateEventInit extends EventInit {
+ state?: any;
+}
+
+interface PositionOptions {
+ enableHighAccuracy?: boolean;
+ maximumAge?: number;
+ timeout?: number;
+}
+
+interface PostMessageOptions {
+ transfer?: any[];
+}
+
+interface ProgressEventInit extends EventInit {
+ lengthComputable?: boolean;
+ loaded?: number;
+ total?: number;
+}
+
+interface PromiseRejectionEventInit extends EventInit {
+ promise: Promise<any>;
+ reason?: any;
+}
+
+interface PropertyIndexedKeyframes {
+ composite?: CompositeOperationOrAuto | CompositeOperationOrAuto[];
+ easing?: string | string[];
+ offset?: number | (number | null)[];
+ [property: string]: string | string[] | number | null | (number | null)[] | undefined;
+}
+
+interface PublicKeyCredentialCreationOptions {
+ attestation?: AttestationConveyancePreference;
+ authenticatorSelection?: AuthenticatorSelectionCriteria;
+ challenge: BufferSource;
+ excludeCredentials?: PublicKeyCredentialDescriptor[];
+ extensions?: AuthenticationExtensionsClientInputs;
+ pubKeyCredParams: PublicKeyCredentialParameters[];
+ rp: PublicKeyCredentialRpEntity;
+ timeout?: number;
+ user: PublicKeyCredentialUserEntity;
+}
+
+interface PublicKeyCredentialDescriptor {
+ id: BufferSource;
+ transports?: AuthenticatorTransport[];
+ type: PublicKeyCredentialType;
+}
+
+interface PublicKeyCredentialEntity {
+ icon?: string;
+ name: string;
+}
+
+interface PublicKeyCredentialParameters {
+ alg: COSEAlgorithmIdentifier;
+ type: PublicKeyCredentialType;
+}
+
+interface PublicKeyCredentialRequestOptions {
+ allowCredentials?: PublicKeyCredentialDescriptor[];
+ challenge: BufferSource;
+ extensions?: AuthenticationExtensionsClientInputs;
+ rpId?: string;
+ timeout?: number;
+ userVerification?: UserVerificationRequirement;
+}
+
+interface PublicKeyCredentialRpEntity extends PublicKeyCredentialEntity {
+ id?: string;
+}
+
+interface PublicKeyCredentialUserEntity extends PublicKeyCredentialEntity {
+ displayName: string;
+ id: BufferSource;
+}
+
+interface PushPermissionDescriptor extends PermissionDescriptor {
+ name: "push";
+ userVisibleOnly?: boolean;
+}
+
+interface PushSubscriptionJSON {
+ endpoint?: string;
+ expirationTime?: number | null;
+ keys?: Record<string, string>;
+}
+
+interface PushSubscriptionOptionsInit {
+ applicationServerKey?: BufferSource | string | null;
+ userVisibleOnly?: boolean;
+}
+
+interface QueuingStrategy<T = any> {
+ highWaterMark?: number;
+ size?: QueuingStrategySizeCallback<T>;
+}
+
+interface RTCAnswerOptions extends RTCOfferAnswerOptions {
+}
+
+interface RTCCertificateExpiration {
+ expires?: number;
+}
+
+interface RTCConfiguration {
+ bundlePolicy?: RTCBundlePolicy;
+ certificates?: RTCCertificate[];
+ iceCandidatePoolSize?: number;
+ iceServers?: RTCIceServer[];
+ iceTransportPolicy?: RTCIceTransportPolicy;
+ peerIdentity?: string;
+ rtcpMuxPolicy?: RTCRtcpMuxPolicy;
+}
+
+interface RTCDTMFToneChangeEventInit extends EventInit {
+ tone: string;
+}
+
+interface RTCDataChannelEventInit extends EventInit {
+ channel: RTCDataChannel;
+}
+
+interface RTCDataChannelInit {
+ id?: number;
+ maxPacketLifeTime?: number;
+ maxRetransmits?: number;
+ negotiated?: boolean;
+ ordered?: boolean;
+ priority?: RTCPriorityType;
+ protocol?: string;
+}
+
+interface RTCDtlsFingerprint {
+ algorithm?: string;
+ value?: string;
+}
+
+interface RTCDtlsParameters {
+ fingerprints?: RTCDtlsFingerprint[];
+ role?: RTCDtlsRole;
+}
+
+interface RTCErrorEventInit extends EventInit {
+ error: RTCError;
+}
+
+interface RTCErrorInit {
+ errorDetail: RTCErrorDetailType;
+ httpRequestStatusCode?: number;
+ receivedAlert?: number;
+ sctpCauseCode?: number;
+ sdpLineNumber?: number;
+ sentAlert?: number;
+}
+
+interface RTCIceCandidateAttributes extends RTCStats {
+ addressSourceUrl?: string;
+ candidateType?: RTCStatsIceCandidateType;
+ ipAddress?: string;
+ portNumber?: number;
+ priority?: number;
+ transport?: string;
+}
+
+interface RTCIceCandidateComplete {
+}
+
+interface RTCIceCandidateDictionary {
+ foundation?: string;
+ ip?: string;
+ msMTurnSessionId?: string;
+ port?: number;
+ priority?: number;
+ protocol?: RTCIceProtocol;
+ relatedAddress?: string;
+ relatedPort?: number;
+ tcpType?: RTCIceTcpCandidateType;
+ type?: RTCIceCandidateType;
+}
+
+interface RTCIceCandidateInit {
+ candidate?: string;
+ sdpMLineIndex?: number | null;
+ sdpMid?: string | null;
+ usernameFragment?: string | null;
+}
+
+interface RTCIceCandidatePair {
+ local?: RTCIceCandidate;
+ remote?: RTCIceCandidate;
+}
+
+interface RTCIceCandidatePairStats extends RTCStats {
+ availableIncomingBitrate?: number;
+ availableOutgoingBitrate?: number;
+ bytesReceived?: number;
+ bytesSent?: number;
+ localCandidateId?: string;
+ nominated?: boolean;
+ priority?: number;
+ readable?: boolean;
+ remoteCandidateId?: string;
+ roundTripTime?: number;
+ state?: RTCStatsIceCandidatePairState;
+ transportId?: string;
+ writable?: boolean;
+}
+
+interface RTCIceGatherOptions {
+ gatherPolicy?: RTCIceGatherPolicy;
+ iceservers?: RTCIceServer[];
+}
+
+interface RTCIceParameters {
+ password?: string;
+ usernameFragment?: string;
+}
+
+interface RTCIceServer {
+ credential?: string | RTCOAuthCredential;
+ credentialType?: RTCIceCredentialType;
+ urls: string | string[];
+ username?: string;
+}
+
+interface RTCIdentityProviderOptions {
+ peerIdentity?: string;
+ protocol?: string;
+ usernameHint?: string;
+}
+
+interface RTCInboundRTPStreamStats extends RTCRTPStreamStats {
+ bytesReceived?: number;
+ fractionLost?: number;
+ jitter?: number;
+ packetsLost?: number;
+ packetsReceived?: number;
+}
+
+interface RTCMediaStreamTrackStats extends RTCStats {
+ audioLevel?: number;
+ echoReturnLoss?: number;
+ echoReturnLossEnhancement?: number;
+ frameHeight?: number;
+ frameWidth?: number;
+ framesCorrupted?: number;
+ framesDecoded?: number;
+ framesDropped?: number;
+ framesPerSecond?: number;
+ framesReceived?: number;
+ framesSent?: number;
+ remoteSource?: boolean;
+ ssrcIds?: string[];
+ trackIdentifier?: string;
+}
+
+interface RTCOAuthCredential {
+ accessToken: string;
+ macKey: string;
+}
+
+interface RTCOfferAnswerOptions {
+ voiceActivityDetection?: boolean;
+}
+
+interface RTCOfferOptions extends RTCOfferAnswerOptions {
+ iceRestart?: boolean;
+ offerToReceiveAudio?: boolean;
+ offerToReceiveVideo?: boolean;
+}
+
+interface RTCOutboundRTPStreamStats extends RTCRTPStreamStats {
+ bytesSent?: number;
+ packetsSent?: number;
+ roundTripTime?: number;
+ targetBitrate?: number;
+}
+
+interface RTCPeerConnectionIceErrorEventInit extends EventInit {
+ errorCode: number;
+ hostCandidate?: string;
+ statusText?: string;
+ url?: string;
+}
+
+interface RTCPeerConnectionIceEventInit extends EventInit {
+ candidate?: RTCIceCandidate | null;
+ url?: string | null;
+}
+
+interface RTCRTPStreamStats extends RTCStats {
+ associateStatsId?: string;
+ codecId?: string;
+ firCount?: number;
+ isRemote?: boolean;
+ mediaTrackId?: string;
+ mediaType?: string;
+ nackCount?: number;
+ pliCount?: number;
+ sliCount?: number;
+ ssrc?: string;
+ transportId?: string;
+}
+
+interface RTCRtcpFeedback {
+ parameter?: string;
+ type?: string;
+}
+
+interface RTCRtcpParameters {
+ cname?: string;
+ reducedSize?: boolean;
+}
+
+interface RTCRtpCapabilities {
+ codecs: RTCRtpCodecCapability[];
+ headerExtensions: RTCRtpHeaderExtensionCapability[];
+}
+
+interface RTCRtpCodecCapability {
+ channels?: number;
+ clockRate: number;
+ mimeType: string;
+ sdpFmtpLine?: string;
+}
+
+interface RTCRtpCodecParameters {
+ channels?: number;
+ clockRate: number;
+ mimeType: string;
+ payloadType: number;
+ sdpFmtpLine?: string;
+}
+
+interface RTCRtpCodingParameters {
+ rid?: string;
+}
+
+interface RTCRtpContributingSource {
+ audioLevel?: number;
+ rtpTimestamp: number;
+ source: number;
+ timestamp: number;
+}
+
+interface RTCRtpDecodingParameters extends RTCRtpCodingParameters {
+}
+
+interface RTCRtpEncodingParameters extends RTCRtpCodingParameters {
+ active?: boolean;
+ codecPayloadType?: number;
+ dtx?: RTCDtxStatus;
+ maxBitrate?: number;
+ maxFramerate?: number;
+ ptime?: number;
+ scaleResolutionDownBy?: number;
+}
+
+interface RTCRtpFecParameters {
+ mechanism?: string;
+ ssrc?: number;
+}
+
+interface RTCRtpHeaderExtension {
+ kind?: string;
+ preferredEncrypt?: boolean;
+ preferredId?: number;
+ uri?: string;
+}
+
+interface RTCRtpHeaderExtensionCapability {
+ uri?: string;
+}
+
+interface RTCRtpHeaderExtensionParameters {
+ encrypted?: boolean;
+ id: number;
+ uri: string;
+}
+
+interface RTCRtpParameters {
+ codecs: RTCRtpCodecParameters[];
+ headerExtensions: RTCRtpHeaderExtensionParameters[];
+ rtcp: RTCRtcpParameters;
+}
+
+interface RTCRtpReceiveParameters extends RTCRtpParameters {
+ encodings: RTCRtpDecodingParameters[];
+}
+
+interface RTCRtpRtxParameters {
+ ssrc?: number;
+}
+
+interface RTCRtpSendParameters extends RTCRtpParameters {
+ degradationPreference?: RTCDegradationPreference;
+ encodings: RTCRtpEncodingParameters[];
+ priority?: RTCPriorityType;
+ transactionId: string;
+}
+
+interface RTCRtpSynchronizationSource extends RTCRtpContributingSource {
+ voiceActivityFlag?: boolean;
+}
+
+interface RTCRtpTransceiverInit {
+ direction?: RTCRtpTransceiverDirection;
+ sendEncodings?: RTCRtpEncodingParameters[];
+ streams?: MediaStream[];
+}
+
+interface RTCRtpUnhandled {
+ muxId?: string;
+ payloadType?: number;
+ ssrc?: number;
+}
+
+interface RTCSessionDescriptionInit {
+ sdp?: string;
+ type?: RTCSdpType;
+}
+
+interface RTCSrtpKeyParam {
+ keyMethod?: string;
+ keySalt?: string;
+ lifetime?: string;
+ mkiLength?: number;
+ mkiValue?: number;
+}
+
+interface RTCSrtpSdesParameters {
+ cryptoSuite?: string;
+ keyParams?: RTCSrtpKeyParam[];
+ sessionParams?: string[];
+ tag?: number;
+}
+
+interface RTCSsrcRange {
+ max?: number;
+ min?: number;
+}
+
+interface RTCStats {
+ id: string;
+ timestamp: number;
+ type: RTCStatsType;
+}
+
+interface RTCStatsEventInit extends EventInit {
+ report: RTCStatsReport;
+}
+
+interface RTCStatsReport {
+}
+
+interface RTCTrackEventInit extends EventInit {
+ receiver: RTCRtpReceiver;
+ streams?: MediaStream[];
+ track: MediaStreamTrack;
+ transceiver: RTCRtpTransceiver;
+}
+
+interface RTCTransportStats extends RTCStats {
+ activeConnection?: boolean;
+ bytesReceived?: number;
+ bytesSent?: number;
+ localCertificateId?: string;
+ remoteCertificateId?: string;
+ rtcpTransportStatsId?: string;
+ selectedCandidatePairId?: string;
+}
+
+interface ReadableStreamReadDoneResult<T> {
+ done: true;
+ value?: T;
+}
+
+interface ReadableStreamReadValueResult<T> {
+ done: false;
+ value: T;
+}
+
+interface RegistrationOptions {
+ scope?: string;
+ type?: WorkerType;
+ updateViaCache?: ServiceWorkerUpdateViaCache;
+}
+
+interface RequestInit {
+ /**
+ * A BodyInit object or null to set request's body.
+ */
+ body?: BodyInit | null;
+ /**
+ * A string indicating how the request will interact with the browser's cache to set request's cache.
+ */
+ cache?: RequestCache;
+ /**
+ * A string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL. Sets request's credentials.
+ */
+ credentials?: RequestCredentials;
+ /**
+ * A Headers object, an object literal, or an array of two-item arrays to set request's headers.
+ */
+ headers?: HeadersInit;
+ /**
+ * A cryptographic hash of the resource to be fetched by request. Sets request's integrity.
+ */
+ integrity?: string;
+ /**
+ * A boolean to set request's keepalive.
+ */
+ keepalive?: boolean;
+ /**
+ * A string to set request's method.
+ */
+ method?: string;
+ /**
+ * A string to indicate whether the request will use CORS, or will be restricted to same-origin URLs. Sets request's mode.
+ */
+ mode?: RequestMode;
+ /**
+ * A string indicating whether request follows redirects, results in an error upon encountering a redirect, or returns the redirect (in an opaque fashion). Sets request's redirect.
+ */
+ redirect?: RequestRedirect;
+ /**
+ * A string whose value is a same-origin URL, "about:client", or the empty string, to set request's referrer.
+ */
+ referrer?: string;
+ /**
+ * A referrer policy to set request's referrerPolicy.
+ */
+ referrerPolicy?: ReferrerPolicy;
+ /**
+ * An AbortSignal to set request's signal.
+ */
+ signal?: AbortSignal | null;
+ /**
+ * Can only be null. Used to disassociate request from any Window.
+ */
+ window?: any;
+}
+
+interface ResponseInit {
+ headers?: HeadersInit;
+ status?: number;
+ statusText?: string;
+}
+
+interface RsaHashedImportParams extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+}
+
+interface RsaHashedKeyAlgorithm extends RsaKeyAlgorithm {
+ hash: KeyAlgorithm;
+}
+
+interface RsaHashedKeyGenParams extends RsaKeyGenParams {
+ hash: HashAlgorithmIdentifier;
+}
+
+interface RsaKeyAlgorithm extends KeyAlgorithm {
+ modulusLength: number;
+ publicExponent: BigInteger;
+}
+
+interface RsaKeyGenParams extends Algorithm {
+ modulusLength: number;
+ publicExponent: BigInteger;
+}
+
+interface RsaOaepParams extends Algorithm {
+ label?: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer;
+}
+
+interface RsaOtherPrimesInfo {
+ d?: string;
+ r?: string;
+ t?: string;
+}
+
+interface RsaPssParams extends Algorithm {
+ saltLength: number;
+}
+
+interface SVGBoundingBoxOptions {
+ clipped?: boolean;
+ fill?: boolean;
+ markers?: boolean;
+ stroke?: boolean;
+}
+
+interface ScopedCredentialDescriptor {
+ id: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer | null;
+ transports?: Transport[];
+ type: ScopedCredentialType;
+}
+
+interface ScopedCredentialOptions {
+ excludeList?: ScopedCredentialDescriptor[];
+ extensions?: WebAuthnExtensions;
+ rpId?: string;
+ timeoutSeconds?: number;
+}
+
+interface ScopedCredentialParameters {
+ algorithm: string | Algorithm;
+ type: ScopedCredentialType;
+}
+
+interface ScrollIntoViewOptions extends ScrollOptions {
+ block?: ScrollLogicalPosition;
+ inline?: ScrollLogicalPosition;
+}
+
+interface ScrollOptions {
+ behavior?: ScrollBehavior;
+}
+
+interface ScrollToOptions extends ScrollOptions {
+ left?: number;
+ top?: number;
+}
+
+interface SecurityPolicyViolationEventInit extends EventInit {
+ blockedURI?: string;
+ columnNumber?: number;
+ documentURI?: string;
+ effectiveDirective?: string;
+ lineNumber?: number;
+ originalPolicy?: string;
+ referrer?: string;
+ sourceFile?: string;
+ statusCode?: number;
+ violatedDirective?: string;
+}
+
+interface ServiceWorkerMessageEventInit extends EventInit {
+ data?: any;
+ lastEventId?: string;
+ origin?: string;
+ ports?: MessagePort[] | null;
+ source?: ServiceWorker | MessagePort | null;
+}
+
+interface ShadowRootInit {
+ delegatesFocus?: boolean;
+ mode: ShadowRootMode;
+}
+
+interface ShareData {
+ text?: string;
+ title?: string;
+ url?: string;
+}
+
+interface SpeechSynthesisErrorEventInit extends SpeechSynthesisEventInit {
+ error: SpeechSynthesisErrorCode;
+}
+
+interface SpeechSynthesisEventInit extends EventInit {
+ charIndex?: number;
+ charLength?: number;
+ elapsedTime?: number;
+ name?: string;
+ utterance: SpeechSynthesisUtterance;
+}
+
+interface StaticRangeInit {
+ endContainer: Node;
+ endOffset: number;
+ startContainer: Node;
+ startOffset: number;
+}
+
+interface StereoPannerOptions extends AudioNodeOptions {
+ pan?: number;
+}
+
+interface StorageEstimate {
+ quota?: number;
+ usage?: number;
+}
+
+interface StorageEventInit extends EventInit {
+ key?: string | null;
+ newValue?: string | null;
+ oldValue?: string | null;
+ storageArea?: Storage | null;
+ url?: string;
+}
+
+interface StoreExceptionsInformation extends ExceptionInformation {
+ detailURI?: string | null;
+ explanationString?: string | null;
+ siteName?: string | null;
+}
+
+interface StoreSiteSpecificExceptionsInformation extends StoreExceptionsInformation {
+ arrayOfDomainStrings?: string[];
+}
+
+interface TextDecodeOptions {
+ stream?: boolean;
+}
+
+interface TextDecoderOptions {
+ fatal?: boolean;
+ ignoreBOM?: boolean;
+}
+
+interface TextEncoderEncodeIntoResult {
+ read?: number;
+ written?: number;
+}
+
+interface TouchEventInit extends EventModifierInit {
+ changedTouches?: Touch[];
+ targetTouches?: Touch[];
+ touches?: Touch[];
+}
+
+interface TouchInit {
+ altitudeAngle?: number;
+ azimuthAngle?: number;
+ clientX?: number;
+ clientY?: number;
+ force?: number;
+ identifier: number;
+ pageX?: number;
+ pageY?: number;
+ radiusX?: number;
+ radiusY?: number;
+ rotationAngle?: number;
+ screenX?: number;
+ screenY?: number;
+ target: EventTarget;
+ touchType?: TouchType;
+}
+
+interface TrackEventInit extends EventInit {
+ track?: TextTrack | null;
+}
+
+interface Transformer<I = any, O = any> {
+ flush?: TransformStreamDefaultControllerCallback<O>;
+ readableType?: undefined;
+ start?: TransformStreamDefaultControllerCallback<O>;
+ transform?: TransformStreamDefaultControllerTransformCallback<I, O>;
+ writableType?: undefined;
+}
+
+interface TransitionEventInit extends EventInit {
+ elapsedTime?: number;
+ propertyName?: string;
+ pseudoElement?: string;
+}
+
+interface UIEventInit extends EventInit {
+ detail?: number;
+ view?: Window | null;
+}
+
+interface ULongRange {
+ max?: number;
+ min?: number;
+}
+
+interface UnderlyingByteSource {
+ autoAllocateChunkSize?: number;
+ cancel?: ReadableStreamErrorCallback;
+ pull?: ReadableByteStreamControllerCallback;
+ start?: ReadableByteStreamControllerCallback;
+ type: "bytes";
+}
+
+interface UnderlyingSink<W = any> {
+ abort?: WritableStreamErrorCallback;
+ close?: WritableStreamDefaultControllerCloseCallback;
+ start?: WritableStreamDefaultControllerStartCallback;
+ type?: undefined;
+ write?: WritableStreamDefaultControllerWriteCallback<W>;
+}
+
+interface UnderlyingSource<R = any> {
+ cancel?: ReadableStreamErrorCallback;
+ pull?: ReadableStreamDefaultControllerCallback<R>;
+ start?: ReadableStreamDefaultControllerCallback<R>;
+ type?: undefined;
+}
+
+interface VRDisplayEventInit extends EventInit {
+ display: VRDisplay;
+ reason?: VRDisplayEventReason;
+}
+
+interface VRLayer {
+ leftBounds?: number[] | Float32Array | null;
+ rightBounds?: number[] | Float32Array | null;
+ source?: HTMLCanvasElement | null;
+}
+
+interface VRStageParameters {
+ sittingToStandingTransform?: Float32Array;
+ sizeX?: number;
+ sizeY?: number;
+}
+
+interface WaveShaperOptions extends AudioNodeOptions {
+ curve?: number[] | Float32Array;
+ oversample?: OverSampleType;
+}
+
+interface WebAuthnExtensions {
+}
+
+interface WebGLContextAttributes {
+ alpha?: boolean;
+ antialias?: boolean;
+ depth?: boolean;
+ desynchronized?: boolean;
+ failIfMajorPerformanceCaveat?: boolean;
+ powerPreference?: WebGLPowerPreference;
+ premultipliedAlpha?: boolean;
+ preserveDrawingBuffer?: boolean;
+ stencil?: boolean;
+}
+
+interface WebGLContextEventInit extends EventInit {
+ statusMessage?: string;
+}
+
+interface WheelEventInit extends MouseEventInit {
+ deltaMode?: number;
+ deltaX?: number;
+ deltaY?: number;
+ deltaZ?: number;
+}
+
+interface WorkerOptions {
+ credentials?: RequestCredentials;
+ name?: string;
+ type?: WorkerType;
+}
+
+interface WorkletOptions {
+ credentials?: RequestCredentials;
+}
+
+interface txAuthGenericArg {
+ content: ArrayBuffer;
+ contentType: string;
+}
+
+interface EventListener {
+ (evt: Event): void;
+}
+
+type XPathNSResolver = ((prefix: string | null) => string | null) | { lookupNamespaceURI(prefix: string | null): string | null; };
+
+/** The ANGLE_instanced_arrays extension is part of the WebGL API and allows to draw the same object, or groups of similar objects multiple times, if they share the same vertex data, primitive count and type. */
+interface ANGLE_instanced_arrays {
+ drawArraysInstancedANGLE(mode: GLenum, first: GLint, count: GLsizei, primcount: GLsizei): void;
+ drawElementsInstancedANGLE(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr, primcount: GLsizei): void;
+ vertexAttribDivisorANGLE(index: GLuint, divisor: GLuint): void;
+ readonly VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: GLenum;
+}
+
+/** A controller object that allows you to abort one or more DOM requests as and when desired. */
+interface AbortController {
+ /**
+ * Returns the AbortSignal object associated with this object.
+ */
+ readonly signal: AbortSignal;
+ /**
+ * Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted.
+ */
+ abort(): void;
+}
+
+declare var AbortController: {
+ prototype: AbortController;
+ new(): AbortController;
+};
+
+interface AbortSignalEventMap {
+ "abort": Event;
+}
+
+/** A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object. */
+interface AbortSignal extends EventTarget {
+ /**
+ * Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.
+ */
+ readonly aborted: boolean;
+ onabort: ((this: AbortSignal, ev: Event) => any) | null;
+ addEventListener<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var AbortSignal: {
+ prototype: AbortSignal;
+ new(): AbortSignal;
+};
+
+interface AbstractRange {
+ /**
+ * Returns true if range is collapsed, and false otherwise.
+ */
+ readonly collapsed: boolean;
+ /**
+ * Returns range's end node.
+ */
+ readonly endContainer: Node;
+ /**
+ * Returns range's end offset.
+ */
+ readonly endOffset: number;
+ /**
+ * Returns range's start node.
+ */
+ readonly startContainer: Node;
+ /**
+ * Returns range's start offset.
+ */
+ readonly startOffset: number;
+}
+
+declare var AbstractRange: {
+ prototype: AbstractRange;
+ new(): AbstractRange;
+};
+
+interface AbstractWorkerEventMap {
+ "error": ErrorEvent;
+}
+
+interface AbstractWorker {
+ onerror: ((this: AbstractWorker, ev: ErrorEvent) => any) | null;
+ addEventListener<K extends keyof AbstractWorkerEventMap>(type: K, listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof AbstractWorkerEventMap>(type: K, listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+interface AesCfbParams extends Algorithm {
+ iv: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer;
+}
+
+interface AesCmacParams extends Algorithm {
+ length: number;
+}
+
+/** A node able to provide real-time frequency and time-domain analysis information. It is an AudioNode that passes the audio stream unchanged from the input to the output, but allows you to take the generated data, process it, and create audio visualizations. */
+interface AnalyserNode extends AudioNode {
+ fftSize: number;
+ readonly frequencyBinCount: number;
+ maxDecibels: number;
+ minDecibels: number;
+ smoothingTimeConstant: number;
+ getByteFrequencyData(array: Uint8Array): void;
+ getByteTimeDomainData(array: Uint8Array): void;
+ getFloatFrequencyData(array: Float32Array): void;
+ getFloatTimeDomainData(array: Float32Array): void;
+}
+
+declare var AnalyserNode: {
+ prototype: AnalyserNode;
+ new(context: BaseAudioContext, options?: AnalyserOptions): AnalyserNode;
+};
+
+interface Animatable {
+ animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions): Animation;
+ getAnimations(): Animation[];
+}
+
+interface AnimationEventMap {
+ "cancel": AnimationPlaybackEvent;
+ "finish": AnimationPlaybackEvent;
+}
+
+interface Animation extends EventTarget {
+ currentTime: number | null;
+ effect: AnimationEffect | null;
+ readonly finished: Promise<Animation>;
+ id: string;
+ oncancel: ((this: Animation, ev: AnimationPlaybackEvent) => any) | null;
+ onfinish: ((this: Animation, ev: AnimationPlaybackEvent) => any) | null;
+ readonly pending: boolean;
+ readonly playState: AnimationPlayState;
+ playbackRate: number;
+ readonly ready: Promise<Animation>;
+ startTime: number | null;
+ timeline: AnimationTimeline | null;
+ cancel(): void;
+ finish(): void;
+ pause(): void;
+ play(): void;
+ reverse(): void;
+ updatePlaybackRate(playbackRate: number): void;
+ addEventListener<K extends keyof AnimationEventMap>(type: K, listener: (this: Animation, ev: AnimationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof AnimationEventMap>(type: K, listener: (this: Animation, ev: AnimationEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var Animation: {
+ prototype: Animation;
+ new(effect?: AnimationEffect | null, timeline?: AnimationTimeline | null): Animation;
+};
+
+interface AnimationEffect {
+ getComputedTiming(): ComputedEffectTiming;
+ getTiming(): EffectTiming;
+ updateTiming(timing?: OptionalEffectTiming): void;
+}
+
+declare var AnimationEffect: {
+ prototype: AnimationEffect;
+ new(): AnimationEffect;
+};
+
+/** Events providing information related to animations. */
+interface AnimationEvent extends Event {
+ readonly animationName: string;
+ readonly elapsedTime: number;
+ readonly pseudoElement: string;
+}
+
+declare var AnimationEvent: {
+ prototype: AnimationEvent;
+ new(type: string, animationEventInitDict?: AnimationEventInit): AnimationEvent;
+};
+
+interface AnimationFrameProvider {
+ cancelAnimationFrame(handle: number): void;
+ requestAnimationFrame(callback: FrameRequestCallback): number;
+}
+
+interface AnimationPlaybackEvent extends Event {
+ readonly currentTime: number | null;
+ readonly timelineTime: number | null;
+}
+
+declare var AnimationPlaybackEvent: {
+ prototype: AnimationPlaybackEvent;
+ new(type: string, eventInitDict?: AnimationPlaybackEventInit): AnimationPlaybackEvent;
+};
+
+interface AnimationTimeline {
+ readonly currentTime: number | null;
+}
+
+declare var AnimationTimeline: {
+ prototype: AnimationTimeline;
+ new(): AnimationTimeline;
+};
+
+interface ApplicationCacheEventMap {
+ "cached": Event;
+ "checking": Event;
+ "downloading": Event;
+ "error": Event;
+ "noupdate": Event;
+ "obsolete": Event;
+ "progress": ProgressEvent<ApplicationCache>;
+ "updateready": Event;
+}
+
+interface ApplicationCache extends EventTarget {
+ /** @deprecated */
+ oncached: ((this: ApplicationCache, ev: Event) => any) | null;
+ /** @deprecated */
+ onchecking: ((this: ApplicationCache, ev: Event) => any) | null;
+ /** @deprecated */
+ ondownloading: ((this: ApplicationCache, ev: Event) => any) | null;
+ /** @deprecated */
+ onerror: ((this: ApplicationCache, ev: Event) => any) | null;
+ /** @deprecated */
+ onnoupdate: ((this: ApplicationCache, ev: Event) => any) | null;
+ /** @deprecated */
+ onobsolete: ((this: ApplicationCache, ev: Event) => any) | null;
+ /** @deprecated */
+ onprogress: ((this: ApplicationCache, ev: ProgressEvent<ApplicationCache>) => any) | null;
+ /** @deprecated */
+ onupdateready: ((this: ApplicationCache, ev: Event) => any) | null;
+ /** @deprecated */
+ readonly status: number;
+ /** @deprecated */
+ abort(): void;
+ /** @deprecated */
+ swapCache(): void;
+ /** @deprecated */
+ update(): void;
+ readonly CHECKING: number;
+ readonly DOWNLOADING: number;
+ readonly IDLE: number;
+ readonly OBSOLETE: number;
+ readonly UNCACHED: number;
+ readonly UPDATEREADY: number;
+ addEventListener<K extends keyof ApplicationCacheEventMap>(type: K, listener: (this: ApplicationCache, ev: ApplicationCacheEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof ApplicationCacheEventMap>(type: K, listener: (this: ApplicationCache, ev: ApplicationCacheEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var ApplicationCache: {
+ prototype: ApplicationCache;
+ new(): ApplicationCache;
+ readonly CHECKING: number;
+ readonly DOWNLOADING: number;
+ readonly IDLE: number;
+ readonly OBSOLETE: number;
+ readonly UNCACHED: number;
+ readonly UPDATEREADY: number;
+};
+
+/** A DOM element's attribute as an object. In most DOM methods, you will probably directly retrieve the attribute as a string (e.g., Element.getAttribute(), but certain functions (e.g., Element.getAttributeNode()) or means of iterating give Attr types. */
+interface Attr extends Node {
+ readonly localName: string;
+ readonly name: string;
+ readonly namespaceURI: string | null;
+ readonly ownerDocument: Document;
+ readonly ownerElement: Element | null;
+ readonly prefix: string | null;
+ readonly specified: boolean;
+ value: string;
+}
+
+declare var Attr: {
+ prototype: Attr;
+ new(): Attr;
+};
+
+/** A short audio asset residing in memory, created from an audio file using the AudioContext.decodeAudioData() method, or from raw data using AudioContext.createBuffer(). Once put into an AudioBuffer, the audio can then be played by being passed into an AudioBufferSourceNode. */
+interface AudioBuffer {
+ readonly duration: number;
+ readonly length: number;
+ readonly numberOfChannels: number;
+ readonly sampleRate: number;
+ copyFromChannel(destination: Float32Array, channelNumber: number, bufferOffset?: number): void;
+ copyToChannel(source: Float32Array, channelNumber: number, bufferOffset?: number): void;
+ getChannelData(channel: number): Float32Array;
+}
+
+declare var AudioBuffer: {
+ prototype: AudioBuffer;
+ new(options: AudioBufferOptions): AudioBuffer;
+};
+
+/** An AudioScheduledSourceNode which represents an audio source consisting of in-memory audio data, stored in an AudioBuffer. It's especially useful for playing back audio which has particularly stringent timing accuracy requirements, such as for sounds that must match a specific rhythm and can be kept in memory rather than being played from disk or the network. */
+interface AudioBufferSourceNode extends AudioScheduledSourceNode {
+ buffer: AudioBuffer | null;
+ readonly detune: AudioParam;
+ loop: boolean;
+ loopEnd: number;
+ loopStart: number;
+ readonly playbackRate: AudioParam;
+ start(when?: number, offset?: number, duration?: number): void;
+ addEventListener<K extends keyof AudioScheduledSourceNodeEventMap>(type: K, listener: (this: AudioBufferSourceNode, ev: AudioScheduledSourceNodeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof AudioScheduledSourceNodeEventMap>(type: K, listener: (this: AudioBufferSourceNode, ev: AudioScheduledSourceNodeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var AudioBufferSourceNode: {
+ prototype: AudioBufferSourceNode;
+ new(context: BaseAudioContext, options?: AudioBufferSourceOptions): AudioBufferSourceNode;
+};
+
+/** An audio-processing graph built from audio modules linked together, each represented by an AudioNode. */
+interface AudioContext extends BaseAudioContext {
+ readonly baseLatency: number;
+ readonly outputLatency: number;
+ close(): Promise<void>;
+ createMediaElementSource(mediaElement: HTMLMediaElement): MediaElementAudioSourceNode;
+ createMediaStreamDestination(): MediaStreamAudioDestinationNode;
+ createMediaStreamSource(mediaStream: MediaStream): MediaStreamAudioSourceNode;
+ createMediaStreamTrackSource(mediaStreamTrack: MediaStreamTrack): MediaStreamTrackAudioSourceNode;
+ getOutputTimestamp(): AudioTimestamp;
+ resume(): Promise<void>;
+ suspend(): Promise<void>;
+ addEventListener<K extends keyof BaseAudioContextEventMap>(type: K, listener: (this: AudioContext, ev: BaseAudioContextEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof BaseAudioContextEventMap>(type: K, listener: (this: AudioContext, ev: BaseAudioContextEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var AudioContext: {
+ prototype: AudioContext;
+ new(contextOptions?: AudioContextOptions): AudioContext;
+};
+
+/** AudioDestinationNode has no output (as it is the output, no more AudioNode can be linked after it in the audio graph) and one input. The number of channels in the input must be between 0 and the maxChannelCount value or an exception is raised. */
+interface AudioDestinationNode extends AudioNode {
+ readonly maxChannelCount: number;
+}
+
+declare var AudioDestinationNode: {
+ prototype: AudioDestinationNode;
+ new(): AudioDestinationNode;
+};
+
+/** The position and orientation of the unique person listening to the audio scene, and is used in audio spatialization. All PannerNodes spatialize in relation to the AudioListener stored in the BaseAudioContext.listener attribute. */
+interface AudioListener {
+ readonly forwardX: AudioParam;
+ readonly forwardY: AudioParam;
+ readonly forwardZ: AudioParam;
+ readonly positionX: AudioParam;
+ readonly positionY: AudioParam;
+ readonly positionZ: AudioParam;
+ readonly upX: AudioParam;
+ readonly upY: AudioParam;
+ readonly upZ: AudioParam;
+ /** @deprecated */
+ setOrientation(x: number, y: number, z: number, xUp: number, yUp: number, zUp: number): void;
+ /** @deprecated */
+ setPosition(x: number, y: number, z: number): void;
+}
+
+declare var AudioListener: {
+ prototype: AudioListener;
+ new(): AudioListener;
+};
+
+/** A generic interface for representing an audio processing module. Examples include: */
+interface AudioNode extends EventTarget {
+ channelCount: number;
+ channelCountMode: ChannelCountMode;
+ channelInterpretation: ChannelInterpretation;
+ readonly context: BaseAudioContext;
+ readonly numberOfInputs: number;
+ readonly numberOfOutputs: number;
+ connect(destinationNode: AudioNode, output?: number, input?: number): AudioNode;
+ connect(destinationParam: AudioParam, output?: number): void;
+ disconnect(): void;
+ disconnect(output: number): void;
+ disconnect(destinationNode: AudioNode): void;
+ disconnect(destinationNode: AudioNode, output: number): void;
+ disconnect(destinationNode: AudioNode, output: number, input: number): void;
+ disconnect(destinationParam: AudioParam): void;
+ disconnect(destinationParam: AudioParam, output: number): void;
+}
+
+declare var AudioNode: {
+ prototype: AudioNode;
+ new(): AudioNode;
+};
+
+/** The Web Audio API's AudioParam interface represents an audio-related parameter, usually a parameter of an AudioNode (such as GainNode.gain). */
+interface AudioParam {
+ automationRate: AutomationRate;
+ readonly defaultValue: number;
+ readonly maxValue: number;
+ readonly minValue: number;
+ value: number;
+ cancelAndHoldAtTime(cancelTime: number): AudioParam;
+ cancelScheduledValues(cancelTime: number): AudioParam;
+ exponentialRampToValueAtTime(value: number, endTime: number): AudioParam;
+ linearRampToValueAtTime(value: number, endTime: number): AudioParam;
+ setTargetAtTime(target: number, startTime: number, timeConstant: number): AudioParam;
+ setValueAtTime(value: number, startTime: number): AudioParam;
+ setValueCurveAtTime(values: number[] | Float32Array, startTime: number, duration: number): AudioParam;
+}
+
+declare var AudioParam: {
+ prototype: AudioParam;
+ new(): AudioParam;
+};
+
+interface AudioParamMap {
+ forEach(callbackfn: (value: AudioParam, key: string, parent: AudioParamMap) => void, thisArg?: any): void;
+}
+
+declare var AudioParamMap: {
+ prototype: AudioParamMap;
+ new(): AudioParamMap;
+};
+
+/** The Web Audio API events that occur when a ScriptProcessorNode input buffer is ready to be processed. */
+interface AudioProcessingEvent extends Event {
+ readonly inputBuffer: AudioBuffer;
+ readonly outputBuffer: AudioBuffer;
+ readonly playbackTime: number;
+}
+
+declare var AudioProcessingEvent: {
+ prototype: AudioProcessingEvent;
+ new(type: string, eventInitDict: AudioProcessingEventInit): AudioProcessingEvent;
+};
+
+interface AudioScheduledSourceNodeEventMap {
+ "ended": Event;
+}
+
+interface AudioScheduledSourceNode extends AudioNode {
+ onended: ((this: AudioScheduledSourceNode, ev: Event) => any) | null;
+ start(when?: number): void;
+ stop(when?: number): void;
+ addEventListener<K extends keyof AudioScheduledSourceNodeEventMap>(type: K, listener: (this: AudioScheduledSourceNode, ev: AudioScheduledSourceNodeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof AudioScheduledSourceNodeEventMap>(type: K, listener: (this: AudioScheduledSourceNode, ev: AudioScheduledSourceNodeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var AudioScheduledSourceNode: {
+ prototype: AudioScheduledSourceNode;
+ new(): AudioScheduledSourceNode;
+};
+
+interface AudioWorklet extends Worklet {
+}
+
+declare var AudioWorklet: {
+ prototype: AudioWorklet;
+ new(): AudioWorklet;
+};
+
+interface AudioWorkletNodeEventMap {
+ "processorerror": Event;
+}
+
+interface AudioWorkletNode extends AudioNode {
+ onprocessorerror: ((this: AudioWorkletNode, ev: Event) => any) | null;
+ readonly parameters: AudioParamMap;
+ readonly port: MessagePort;
+ addEventListener<K extends keyof AudioWorkletNodeEventMap>(type: K, listener: (this: AudioWorkletNode, ev: AudioWorkletNodeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof AudioWorkletNodeEventMap>(type: K, listener: (this: AudioWorkletNode, ev: AudioWorkletNodeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var AudioWorkletNode: {
+ prototype: AudioWorkletNode;
+ new(context: BaseAudioContext, name: string, options?: AudioWorkletNodeOptions): AudioWorkletNode;
+};
+
+interface AuthenticatorAssertionResponse extends AuthenticatorResponse {
+ readonly authenticatorData: ArrayBuffer;
+ readonly signature: ArrayBuffer;
+ readonly userHandle: ArrayBuffer | null;
+}
+
+declare var AuthenticatorAssertionResponse: {
+ prototype: AuthenticatorAssertionResponse;
+ new(): AuthenticatorAssertionResponse;
+};
+
+interface AuthenticatorAttestationResponse extends AuthenticatorResponse {
+ readonly attestationObject: ArrayBuffer;
+}
+
+declare var AuthenticatorAttestationResponse: {
+ prototype: AuthenticatorAttestationResponse;
+ new(): AuthenticatorAttestationResponse;
+};
+
+interface AuthenticatorResponse {
+ readonly clientDataJSON: ArrayBuffer;
+}
+
+declare var AuthenticatorResponse: {
+ prototype: AuthenticatorResponse;
+ new(): AuthenticatorResponse;
+};
+
+interface BarProp {
+ readonly visible: boolean;
+}
+
+declare var BarProp: {
+ prototype: BarProp;
+ new(): BarProp;
+};
+
+interface BaseAudioContextEventMap {
+ "statechange": Event;
+}
+
+interface BaseAudioContext extends EventTarget {
+ readonly audioWorklet: AudioWorklet;
+ readonly currentTime: number;
+ readonly destination: AudioDestinationNode;
+ readonly listener: AudioListener;
+ onstatechange: ((this: BaseAudioContext, ev: Event) => any) | null;
+ readonly sampleRate: number;
+ readonly state: AudioContextState;
+ createAnalyser(): AnalyserNode;
+ createBiquadFilter(): BiquadFilterNode;
+ createBuffer(numberOfChannels: number, length: number, sampleRate: number): AudioBuffer;
+ createBufferSource(): AudioBufferSourceNode;
+ createChannelMerger(numberOfInputs?: number): ChannelMergerNode;
+ createChannelSplitter(numberOfOutputs?: number): ChannelSplitterNode;
+ createConstantSource(): ConstantSourceNode;
+ createConvolver(): ConvolverNode;
+ createDelay(maxDelayTime?: number): DelayNode;
+ createDynamicsCompressor(): DynamicsCompressorNode;
+ createGain(): GainNode;
+ createIIRFilter(feedforward: number[], feedback: number[]): IIRFilterNode;
+ createOscillator(): OscillatorNode;
+ createPanner(): PannerNode;
+ createPeriodicWave(real: number[] | Float32Array, imag: number[] | Float32Array, constraints?: PeriodicWaveConstraints): PeriodicWave;
+ createScriptProcessor(bufferSize?: number, numberOfInputChannels?: number, numberOfOutputChannels?: number): ScriptProcessorNode;
+ createStereoPanner(): StereoPannerNode;
+ createWaveShaper(): WaveShaperNode;
+ decodeAudioData(audioData: ArrayBuffer, successCallback?: DecodeSuccessCallback | null, errorCallback?: DecodeErrorCallback | null): Promise<AudioBuffer>;
+ addEventListener<K extends keyof BaseAudioContextEventMap>(type: K, listener: (this: BaseAudioContext, ev: BaseAudioContextEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof BaseAudioContextEventMap>(type: K, listener: (this: BaseAudioContext, ev: BaseAudioContextEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var BaseAudioContext: {
+ prototype: BaseAudioContext;
+ new(): BaseAudioContext;
+};
+
+/** The beforeunload event is fired when the window, the document and its resources are about to be unloaded. */
+interface BeforeUnloadEvent extends Event {
+ returnValue: any;
+}
+
+declare var BeforeUnloadEvent: {
+ prototype: BeforeUnloadEvent;
+ new(): BeforeUnloadEvent;
+};
+
+interface BhxBrowser {
+ readonly lastError: DOMException;
+ checkMatchesGlobExpression(pattern: string, value: string): boolean;
+ checkMatchesUriExpression(pattern: string, value: string): boolean;
+ clearLastError(): void;
+ currentWindowId(): number;
+ fireExtensionApiTelemetry(functionName: string, isSucceeded: boolean, isSupported: boolean, errorString: string): void;
+ genericFunction(functionId: number, destination: any, parameters?: string, callbackId?: number): void;
+ genericSynchronousFunction(functionId: number, parameters?: string): string;
+ getExtensionId(): string;
+ getThisAddress(): any;
+ registerGenericFunctionCallbackHandler(callbackHandler: Function): void;
+ registerGenericListenerHandler(eventHandler: Function): void;
+ setLastError(parameters: string): void;
+ webPlatformGenericFunction(destination: any, parameters?: string, callbackId?: number): void;
+}
+
+declare var BhxBrowser: {
+ prototype: BhxBrowser;
+ new(): BhxBrowser;
+};
+
+/** A simple low-order filter, and is created using the AudioContext.createBiquadFilter() method. It is an AudioNode that can represent different kinds of filters, tone control devices, and graphic equalizers. */
+interface BiquadFilterNode extends AudioNode {
+ readonly Q: AudioParam;
+ readonly detune: AudioParam;
+ readonly frequency: AudioParam;
+ readonly gain: AudioParam;
+ type: BiquadFilterType;
+ getFrequencyResponse(frequencyHz: Float32Array, magResponse: Float32Array, phaseResponse: Float32Array): void;
+}
+
+declare var BiquadFilterNode: {
+ prototype: BiquadFilterNode;
+ new(context: BaseAudioContext, options?: BiquadFilterOptions): BiquadFilterNode;
+};
+
+/** A file-like object of immutable, raw data. Blobs represent data that isn't necessarily in a JavaScript-native format. The File interface is based on Blob, inheriting blob functionality and expanding it to support files on the user's system. */
+interface Blob {
+ readonly size: number;
+ readonly type: string;
+ arrayBuffer(): Promise<ArrayBuffer>;
+ slice(start?: number, end?: number, contentType?: string): Blob;
+ stream(): ReadableStream;
+ text(): Promise<string>;
+}
+
+declare var Blob: {
+ prototype: Blob;
+ new(blobParts?: BlobPart[], options?: BlobPropertyBag): Blob;
+};
+
+interface Body {
+ readonly body: ReadableStream<Uint8Array> | null;
+ readonly bodyUsed: boolean;
+ arrayBuffer(): Promise<ArrayBuffer>;
+ blob(): Promise<Blob>;
+ formData(): Promise<FormData>;
+ json(): Promise<any>;
+ text(): Promise<string>;
+}
+
+interface BroadcastChannelEventMap {
+ "message": MessageEvent;
+ "messageerror": MessageEvent;
+}
+
+interface BroadcastChannel extends EventTarget {
+ /**
+ * Returns the channel name (as passed to the constructor).
+ */
+ readonly name: string;
+ onmessage: ((this: BroadcastChannel, ev: MessageEvent) => any) | null;
+ onmessageerror: ((this: BroadcastChannel, ev: MessageEvent) => any) | null;
+ /**
+ * Closes the BroadcastChannel object, opening it up to garbage collection.
+ */
+ close(): void;
+ /**
+ * Sends the given message to other BroadcastChannel objects set up for this channel. Messages can be structured objects, e.g. nested objects and arrays.
+ */
+ postMessage(message: any): void;
+ addEventListener<K extends keyof BroadcastChannelEventMap>(type: K, listener: (this: BroadcastChannel, ev: BroadcastChannelEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof BroadcastChannelEventMap>(type: K, listener: (this: BroadcastChannel, ev: BroadcastChannelEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var BroadcastChannel: {
+ prototype: BroadcastChannel;
+ new(name: string): BroadcastChannel;
+};
+
+/** This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams. */
+interface ByteLengthQueuingStrategy extends QueuingStrategy<ArrayBufferView> {
+ highWaterMark: number;
+ size(chunk: ArrayBufferView): number;
+}
+
+declare var ByteLengthQueuingStrategy: {
+ prototype: ByteLengthQueuingStrategy;
+ new(options: { highWaterMark: number }): ByteLengthQueuingStrategy;
+};
+
+/** A CDATA section that can be used within XML to include extended portions of unescaped text. The symbols < and & don’t need escaping as they normally do when inside a CDATA section. */
+interface CDATASection extends Text {
+}
+
+declare var CDATASection: {
+ prototype: CDATASection;
+ new(): CDATASection;
+};
+
+/** A single condition CSS at-rule, which consists of a condition and a statement block. It is a child of CSSGroupingRule. */
+interface CSSConditionRule extends CSSGroupingRule {
+ conditionText: string;
+}
+
+declare var CSSConditionRule: {
+ prototype: CSSConditionRule;
+ new(): CSSConditionRule;
+};
+
+interface CSSFontFaceRule extends CSSRule {
+ readonly style: CSSStyleDeclaration;
+}
+
+declare var CSSFontFaceRule: {
+ prototype: CSSFontFaceRule;
+ new(): CSSFontFaceRule;
+};
+
+/** Any CSS at-rule that contains other rules nested within it. */
+interface CSSGroupingRule extends CSSRule {
+ readonly cssRules: CSSRuleList;
+ deleteRule(index: number): void;
+ insertRule(rule: string, index?: number): number;
+}
+
+declare var CSSGroupingRule: {
+ prototype: CSSGroupingRule;
+ new(): CSSGroupingRule;
+};
+
+interface CSSImportRule extends CSSRule {
+ readonly href: string;
+ readonly media: MediaList;
+ readonly styleSheet: CSSStyleSheet;
+}
+
+declare var CSSImportRule: {
+ prototype: CSSImportRule;
+ new(): CSSImportRule;
+};
+
+/** An object representing a set of style for a given keyframe. It corresponds to the contains of a single keyframe of a @keyframes at-rule. It implements the CSSRule interface with a type value of 8 (CSSRule.KEYFRAME_RULE). */
+interface CSSKeyframeRule extends CSSRule {
+ keyText: string;
+ readonly style: CSSStyleDeclaration;
+}
+
+declare var CSSKeyframeRule: {
+ prototype: CSSKeyframeRule;
+ new(): CSSKeyframeRule;
+};
+
+/** An object representing a complete set of keyframes for a CSS animation. It corresponds to the contains of a whole @keyframes at-rule. It implements the CSSRule interface with a type value of 7 (CSSRule.KEYFRAMES_RULE). */
+interface CSSKeyframesRule extends CSSRule {
+ readonly cssRules: CSSRuleList;
+ name: string;
+ appendRule(rule: string): void;
+ deleteRule(select: string): void;
+ findRule(select: string): CSSKeyframeRule | null;
+}
+
+declare var CSSKeyframesRule: {
+ prototype: CSSKeyframesRule;
+ new(): CSSKeyframesRule;
+};
+
+/** A single CSS @media rule. It implements the CSSConditionRule interface, and therefore the CSSGroupingRule and the CSSRule interface with a type value of 4 (CSSRule.MEDIA_RULE). */
+interface CSSMediaRule extends CSSConditionRule {
+ readonly media: MediaList;
+}
+
+declare var CSSMediaRule: {
+ prototype: CSSMediaRule;
+ new(): CSSMediaRule;
+};
+
+/** An object representing a single CSS @namespace at-rule. It implements the CSSRule interface, with a type value of 10 (CSSRule.NAMESPACE_RULE). */
+interface CSSNamespaceRule extends CSSRule {
+ readonly namespaceURI: string;
+ readonly prefix: string;
+}
+
+declare var CSSNamespaceRule: {
+ prototype: CSSNamespaceRule;
+ new(): CSSNamespaceRule;
+};
+
+/** CSSPageRule is an interface representing a single CSS @page rule. It implements the CSSRule interface with a type value of 6 (CSSRule.PAGE_RULE). */
+interface CSSPageRule extends CSSGroupingRule {
+ selectorText: string;
+ readonly style: CSSStyleDeclaration;
+}
+
+declare var CSSPageRule: {
+ prototype: CSSPageRule;
+ new(): CSSPageRule;
+};
+
+/** A single CSS rule. There are several types of rules, listed in the Type constants section below. */
+interface CSSRule {
+ cssText: string;
+ readonly parentRule: CSSRule | null;
+ readonly parentStyleSheet: CSSStyleSheet | null;
+ readonly type: number;
+ readonly CHARSET_RULE: number;
+ readonly FONT_FACE_RULE: number;
+ readonly IMPORT_RULE: number;
+ readonly KEYFRAMES_RULE: number;
+ readonly KEYFRAME_RULE: number;
+ readonly MEDIA_RULE: number;
+ readonly NAMESPACE_RULE: number;
+ readonly PAGE_RULE: number;
+ readonly STYLE_RULE: number;
+ readonly SUPPORTS_RULE: number;
+}
+
+declare var CSSRule: {
+ prototype: CSSRule;
+ new(): CSSRule;
+ readonly CHARSET_RULE: number;
+ readonly FONT_FACE_RULE: number;
+ readonly IMPORT_RULE: number;
+ readonly KEYFRAMES_RULE: number;
+ readonly KEYFRAME_RULE: number;
+ readonly MEDIA_RULE: number;
+ readonly NAMESPACE_RULE: number;
+ readonly PAGE_RULE: number;
+ readonly STYLE_RULE: number;
+ readonly SUPPORTS_RULE: number;
+};
+
+/** A CSSRuleList is an (indirect-modify only) array-like object containing an ordered collection of CSSRule objects. */
+interface CSSRuleList {
+ readonly length: number;
+ item(index: number): CSSRule | null;
+ [index: number]: CSSRule;
+}
+
+declare var CSSRuleList: {
+ prototype: CSSRuleList;
+ new(): CSSRuleList;
+};
+
+/** An object that is a CSS declaration block, and exposes style information and various style-related methods and properties. */
+interface CSSStyleDeclaration {
+ alignContent: string;
+ alignItems: string;
+ alignSelf: string;
+ alignmentBaseline: string;
+ all: string;
+ animation: string;
+ animationDelay: string;
+ animationDirection: string;
+ animationDuration: string;
+ animationFillMode: string;
+ animationIterationCount: string;
+ animationName: string;
+ animationPlayState: string;
+ animationTimingFunction: string;
+ backfaceVisibility: string;
+ background: string;
+ backgroundAttachment: string;
+ backgroundClip: string;
+ backgroundColor: string;
+ backgroundImage: string;
+ backgroundOrigin: string;
+ backgroundPosition: string;
+ backgroundPositionX: string;
+ backgroundPositionY: string;
+ backgroundRepeat: string;
+ backgroundSize: string;
+ baselineShift: string;
+ blockSize: string;
+ border: string;
+ borderBlockEnd: string;
+ borderBlockEndColor: string;
+ borderBlockEndStyle: string;
+ borderBlockEndWidth: string;
+ borderBlockStart: string;
+ borderBlockStartColor: string;
+ borderBlockStartStyle: string;
+ borderBlockStartWidth: string;
+ borderBottom: string;
+ borderBottomColor: string;
+ borderBottomLeftRadius: string;
+ borderBottomRightRadius: string;
+ borderBottomStyle: string;
+ borderBottomWidth: string;
+ borderCollapse: string;
+ borderColor: string;
+ borderImage: string;
+ borderImageOutset: string;
+ borderImageRepeat: string;
+ borderImageSlice: string;
+ borderImageSource: string;
+ borderImageWidth: string;
+ borderInlineEnd: string;
+ borderInlineEndColor: string;
+ borderInlineEndStyle: string;
+ borderInlineEndWidth: string;
+ borderInlineStart: string;
+ borderInlineStartColor: string;
+ borderInlineStartStyle: string;
+ borderInlineStartWidth: string;
+ borderLeft: string;
+ borderLeftColor: string;
+ borderLeftStyle: string;
+ borderLeftWidth: string;
+ borderRadius: string;
+ borderRight: string;
+ borderRightColor: string;
+ borderRightStyle: string;
+ borderRightWidth: string;
+ borderSpacing: string;
+ borderStyle: string;
+ borderTop: string;
+ borderTopColor: string;
+ borderTopLeftRadius: string;
+ borderTopRightRadius: string;
+ borderTopStyle: string;
+ borderTopWidth: string;
+ borderWidth: string;
+ bottom: string;
+ boxShadow: string;
+ boxSizing: string;
+ breakAfter: string;
+ breakBefore: string;
+ breakInside: string;
+ captionSide: string;
+ caretColor: string;
+ clear: string;
+ clip: string;
+ clipPath: string;
+ clipRule: string;
+ color: string;
+ colorInterpolation: string;
+ colorInterpolationFilters: string;
+ columnCount: string;
+ columnFill: string;
+ columnGap: string;
+ columnRule: string;
+ columnRuleColor: string;
+ columnRuleStyle: string;
+ columnRuleWidth: string;
+ columnSpan: string;
+ columnWidth: string;
+ columns: string;
+ content: string;
+ counterIncrement: string;
+ counterReset: string;
+ cssFloat: string;
+ cssText: string;
+ cursor: string;
+ direction: string;
+ display: string;
+ dominantBaseline: string;
+ emptyCells: string;
+ fill: string;
+ fillOpacity: string;
+ fillRule: string;
+ filter: string;
+ flex: string;
+ flexBasis: string;
+ flexDirection: string;
+ flexFlow: string;
+ flexGrow: string;
+ flexShrink: string;
+ flexWrap: string;
+ float: string;
+ floodColor: string;
+ floodOpacity: string;
+ font: string;
+ fontFamily: string;
+ fontFeatureSettings: string;
+ fontKerning: string;
+ fontSize: string;
+ fontSizeAdjust: string;
+ fontStretch: string;
+ fontStyle: string;
+ fontSynthesis: string;
+ fontVariant: string;
+ fontVariantCaps: string;
+ fontVariantEastAsian: string;
+ fontVariantLigatures: string;
+ fontVariantNumeric: string;
+ fontVariantPosition: string;
+ fontWeight: string;
+ gap: string;
+ glyphOrientationVertical: string;
+ grid: string;
+ gridArea: string;
+ gridAutoColumns: string;
+ gridAutoFlow: string;
+ gridAutoRows: string;
+ gridColumn: string;
+ gridColumnEnd: string;
+ gridColumnGap: string;
+ gridColumnStart: string;
+ gridGap: string;
+ gridRow: string;
+ gridRowEnd: string;
+ gridRowGap: string;
+ gridRowStart: string;
+ gridTemplate: string;
+ gridTemplateAreas: string;
+ gridTemplateColumns: string;
+ gridTemplateRows: string;
+ height: string;
+ hyphens: string;
+ imageOrientation: string;
+ imageRendering: string;
+ inlineSize: string;
+ justifyContent: string;
+ justifyItems: string;
+ justifySelf: string;
+ left: string;
+ readonly length: number;
+ letterSpacing: string;
+ lightingColor: string;
+ lineBreak: string;
+ lineHeight: string;
+ listStyle: string;
+ listStyleImage: string;
+ listStylePosition: string;
+ listStyleType: string;
+ margin: string;
+ marginBlockEnd: string;
+ marginBlockStart: string;
+ marginBottom: string;
+ marginInlineEnd: string;
+ marginInlineStart: string;
+ marginLeft: string;
+ marginRight: string;
+ marginTop: string;
+ marker: string;
+ markerEnd: string;
+ markerMid: string;
+ markerStart: string;
+ mask: string;
+ maskComposite: string;
+ maskImage: string;
+ maskPosition: string;
+ maskRepeat: string;
+ maskSize: string;
+ maskType: string;
+ maxBlockSize: string;
+ maxHeight: string;
+ maxInlineSize: string;
+ maxWidth: string;
+ minBlockSize: string;
+ minHeight: string;
+ minInlineSize: string;
+ minWidth: string;
+ objectFit: string;
+ objectPosition: string;
+ opacity: string;
+ order: string;
+ orphans: string;
+ outline: string;
+ outlineColor: string;
+ outlineOffset: string;
+ outlineStyle: string;
+ outlineWidth: string;
+ overflow: string;
+ overflowAnchor: string;
+ overflowWrap: string;
+ overflowX: string;
+ overflowY: string;
+ padding: string;
+ paddingBlockEnd: string;
+ paddingBlockStart: string;
+ paddingBottom: string;
+ paddingInlineEnd: string;
+ paddingInlineStart: string;
+ paddingLeft: string;
+ paddingRight: string;
+ paddingTop: string;
+ pageBreakAfter: string;
+ pageBreakBefore: string;
+ pageBreakInside: string;
+ paintOrder: string;
+ readonly parentRule: CSSRule | null;
+ perspective: string;
+ perspectiveOrigin: string;
+ placeContent: string;
+ placeItems: string;
+ placeSelf: string;
+ pointerEvents: string;
+ position: string;
+ quotes: string;
+ resize: string;
+ right: string;
+ rotate: string;
+ rowGap: string;
+ rubyAlign: string;
+ rubyPosition: string;
+ scale: string;
+ scrollBehavior: string;
+ shapeRendering: string;
+ stopColor: string;
+ stopOpacity: string;
+ stroke: string;
+ strokeDasharray: string;
+ strokeDashoffset: string;
+ strokeLinecap: string;
+ strokeLinejoin: string;
+ strokeMiterlimit: string;
+ strokeOpacity: string;
+ strokeWidth: string;
+ tabSize: string;
+ tableLayout: string;
+ textAlign: string;
+ textAlignLast: string;
+ textAnchor: string;
+ textCombineUpright: string;
+ textDecoration: string;
+ textDecorationColor: string;
+ textDecorationLine: string;
+ textDecorationStyle: string;
+ textEmphasis: string;
+ textEmphasisColor: string;
+ textEmphasisPosition: string;
+ textEmphasisStyle: string;
+ textIndent: string;
+ textJustify: string;
+ textOrientation: string;
+ textOverflow: string;
+ textRendering: string;
+ textShadow: string;
+ textTransform: string;
+ textUnderlinePosition: string;
+ top: string;
+ touchAction: string;
+ transform: string;
+ transformBox: string;
+ transformOrigin: string;
+ transformStyle: string;
+ transition: string;
+ transitionDelay: string;
+ transitionDuration: string;
+ transitionProperty: string;
+ transitionTimingFunction: string;
+ translate: string;
+ unicodeBidi: string;
+ userSelect: string;
+ verticalAlign: string;
+ visibility: string;
+ /** @deprecated */
+ webkitAlignContent: string;
+ /** @deprecated */
+ webkitAlignItems: string;
+ /** @deprecated */
+ webkitAlignSelf: string;
+ /** @deprecated */
+ webkitAnimation: string;
+ /** @deprecated */
+ webkitAnimationDelay: string;
+ /** @deprecated */
+ webkitAnimationDirection: string;
+ /** @deprecated */
+ webkitAnimationDuration: string;
+ /** @deprecated */
+ webkitAnimationFillMode: string;
+ /** @deprecated */
+ webkitAnimationIterationCount: string;
+ /** @deprecated */
+ webkitAnimationName: string;
+ /** @deprecated */
+ webkitAnimationPlayState: string;
+ /** @deprecated */
+ webkitAnimationTimingFunction: string;
+ /** @deprecated */
+ webkitAppearance: string;
+ /** @deprecated */
+ webkitBackfaceVisibility: string;
+ /** @deprecated */
+ webkitBackgroundClip: string;
+ /** @deprecated */
+ webkitBackgroundOrigin: string;
+ /** @deprecated */
+ webkitBackgroundSize: string;
+ /** @deprecated */
+ webkitBorderBottomLeftRadius: string;
+ /** @deprecated */
+ webkitBorderBottomRightRadius: string;
+ /** @deprecated */
+ webkitBorderRadius: string;
+ /** @deprecated */
+ webkitBorderTopLeftRadius: string;
+ /** @deprecated */
+ webkitBorderTopRightRadius: string;
+ /** @deprecated */
+ webkitBoxAlign: string;
+ /** @deprecated */
+ webkitBoxFlex: string;
+ /** @deprecated */
+ webkitBoxOrdinalGroup: string;
+ /** @deprecated */
+ webkitBoxOrient: string;
+ /** @deprecated */
+ webkitBoxPack: string;
+ /** @deprecated */
+ webkitBoxShadow: string;
+ /** @deprecated */
+ webkitBoxSizing: string;
+ /** @deprecated */
+ webkitFilter: string;
+ /** @deprecated */
+ webkitFlex: string;
+ /** @deprecated */
+ webkitFlexBasis: string;
+ /** @deprecated */
+ webkitFlexDirection: string;
+ /** @deprecated */
+ webkitFlexFlow: string;
+ /** @deprecated */
+ webkitFlexGrow: string;
+ /** @deprecated */
+ webkitFlexShrink: string;
+ /** @deprecated */
+ webkitFlexWrap: string;
+ /** @deprecated */
+ webkitJustifyContent: string;
+ webkitLineClamp: string;
+ /** @deprecated */
+ webkitMask: string;
+ /** @deprecated */
+ webkitMaskBoxImage: string;
+ /** @deprecated */
+ webkitMaskBoxImageOutset: string;
+ /** @deprecated */
+ webkitMaskBoxImageRepeat: string;
+ /** @deprecated */
+ webkitMaskBoxImageSlice: string;
+ /** @deprecated */
+ webkitMaskBoxImageSource: string;
+ /** @deprecated */
+ webkitMaskBoxImageWidth: string;
+ /** @deprecated */
+ webkitMaskClip: string;
+ /** @deprecated */
+ webkitMaskComposite: string;
+ /** @deprecated */
+ webkitMaskImage: string;
+ /** @deprecated */
+ webkitMaskOrigin: string;
+ /** @deprecated */
+ webkitMaskPosition: string;
+ /** @deprecated */
+ webkitMaskRepeat: string;
+ /** @deprecated */
+ webkitMaskSize: string;
+ /** @deprecated */
+ webkitOrder: string;
+ /** @deprecated */
+ webkitPerspective: string;
+ /** @deprecated */
+ webkitPerspectiveOrigin: string;
+ webkitTapHighlightColor: string;
+ /** @deprecated */
+ webkitTextFillColor: string;
+ /** @deprecated */
+ webkitTextSizeAdjust: string;
+ /** @deprecated */
+ webkitTextStroke: string;
+ /** @deprecated */
+ webkitTextStrokeColor: string;
+ /** @deprecated */
+ webkitTextStrokeWidth: string;
+ /** @deprecated */
+ webkitTransform: string;
+ /** @deprecated */
+ webkitTransformOrigin: string;
+ /** @deprecated */
+ webkitTransformStyle: string;
+ /** @deprecated */
+ webkitTransition: string;
+ /** @deprecated */
+ webkitTransitionDelay: string;
+ /** @deprecated */
+ webkitTransitionDuration: string;
+ /** @deprecated */
+ webkitTransitionProperty: string;
+ /** @deprecated */
+ webkitTransitionTimingFunction: string;
+ /** @deprecated */
+ webkitUserSelect: string;
+ whiteSpace: string;
+ widows: string;
+ width: string;
+ willChange: string;
+ wordBreak: string;
+ wordSpacing: string;
+ wordWrap: string;
+ writingMode: string;
+ zIndex: string;
+ /** @deprecated */
+ zoom: string;
+ getPropertyPriority(property: string): string;
+ getPropertyValue(property: string): string;
+ item(index: number): string;
+ removeProperty(property: string): string;
+ setProperty(property: string, value: string | null, priority?: string): void;
+ [index: number]: string;
+}
+
+declare var CSSStyleDeclaration: {
+ prototype: CSSStyleDeclaration;
+ new(): CSSStyleDeclaration;
+};
+
+/** CSSStyleRule represents a single CSS style rule. It implements the CSSRule interface with a type value of 1 (CSSRule.STYLE_RULE). */
+interface CSSStyleRule extends CSSRule {
+ selectorText: string;
+ readonly style: CSSStyleDeclaration;
+}
+
+declare var CSSStyleRule: {
+ prototype: CSSStyleRule;
+ new(): CSSStyleRule;
+};
+
+/** A single CSS style sheet. It inherits properties and methods from its parent, StyleSheet. */
+interface CSSStyleSheet extends StyleSheet {
+ readonly cssRules: CSSRuleList;
+ readonly ownerRule: CSSRule | null;
+ readonly rules: CSSRuleList;
+ addRule(selector?: string, style?: string, index?: number): number;
+ deleteRule(index: number): void;
+ insertRule(rule: string, index?: number): number;
+ removeRule(index?: number): void;
+}
+
+declare var CSSStyleSheet: {
+ prototype: CSSStyleSheet;
+ new(): CSSStyleSheet;
+};
+
+/** An object representing a single CSS @supports at-rule. It implements the CSSConditionRule interface, and therefore the CSSRule and CSSGroupingRule interfaces with a type value of 12 (CSSRule.SUPPORTS_RULE). */
+interface CSSSupportsRule extends CSSConditionRule {
+}
+
+declare var CSSSupportsRule: {
+ prototype: CSSSupportsRule;
+ new(): CSSSupportsRule;
+};
+
+/** Provides a storage mechanism for Request / Response object pairs that are cached, for example as part of the ServiceWorker life cycle. Note that the Cache interface is exposed to windowed scopes as well as workers. You don't have to use it in conjunction with service workers, even though it is defined in the service worker spec. */
+interface Cache {
+ add(request: RequestInfo): Promise<void>;
+ addAll(requests: RequestInfo[]): Promise<void>;
+ delete(request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>;
+ keys(request?: RequestInfo, options?: CacheQueryOptions): Promise<ReadonlyArray<Request>>;
+ match(request: RequestInfo, options?: CacheQueryOptions): Promise<Response | undefined>;
+ matchAll(request?: RequestInfo, options?: CacheQueryOptions): Promise<ReadonlyArray<Response>>;
+ put(request: RequestInfo, response: Response): Promise<void>;
+}
+
+declare var Cache: {
+ prototype: Cache;
+ new(): Cache;
+};
+
+/** The storage for Cache objects. */
+interface CacheStorage {
+ delete(cacheName: string): Promise<boolean>;
+ has(cacheName: string): Promise<boolean>;
+ keys(): Promise<string[]>;
+ match(request: RequestInfo, options?: MultiCacheQueryOptions): Promise<Response | undefined>;
+ open(cacheName: string): Promise<Cache>;
+}
+
+declare var CacheStorage: {
+ prototype: CacheStorage;
+ new(): CacheStorage;
+};
+
+interface CanvasCompositing {
+ globalAlpha: number;
+ globalCompositeOperation: string;
+}
+
+interface CanvasDrawImage {
+ drawImage(image: CanvasImageSource, dx: number, dy: number): void;
+ drawImage(image: CanvasImageSource, dx: number, dy: number, dw: number, dh: number): void;
+ drawImage(image: CanvasImageSource, sx: number, sy: number, sw: number, sh: number, dx: number, dy: number, dw: number, dh: number): void;
+}
+
+interface CanvasDrawPath {
+ beginPath(): void;
+ clip(fillRule?: CanvasFillRule): void;
+ clip(path: Path2D, fillRule?: CanvasFillRule): void;
+ fill(fillRule?: CanvasFillRule): void;
+ fill(path: Path2D, fillRule?: CanvasFillRule): void;
+ isPointInPath(x: number, y: number, fillRule?: CanvasFillRule): boolean;
+ isPointInPath(path: Path2D, x: number, y: number, fillRule?: CanvasFillRule): boolean;
+ isPointInStroke(x: number, y: number): boolean;
+ isPointInStroke(path: Path2D, x: number, y: number): boolean;
+ stroke(): void;
+ stroke(path: Path2D): void;
+}
+
+interface CanvasFillStrokeStyles {
+ fillStyle: string | CanvasGradient | CanvasPattern;
+ strokeStyle: string | CanvasGradient | CanvasPattern;
+ createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient;
+ createPattern(image: CanvasImageSource, repetition: string | null): CanvasPattern | null;
+ createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient;
+}
+
+interface CanvasFilters {
+ filter: string;
+}
+
+/** An opaque object describing a gradient. It is returned by the methods CanvasRenderingContext2D.createLinearGradient() or CanvasRenderingContext2D.createRadialGradient(). */
+interface CanvasGradient {
+ /**
+ * Adds a color stop with the given color to the gradient at the given offset. 0.0 is the offset at one end of the gradient, 1.0 is the offset at the other end.
+ *
+ * Throws an "IndexSizeError" DOMException if the offset is out of range. Throws a "SyntaxError" DOMException if the color cannot be parsed.
+ */
+ addColorStop(offset: number, color: string): void;
+}
+
+declare var CanvasGradient: {
+ prototype: CanvasGradient;
+ new(): CanvasGradient;
+};
+
+interface CanvasImageData {
+ createImageData(sw: number, sh: number): ImageData;
+ createImageData(imagedata: ImageData): ImageData;
+ getImageData(sx: number, sy: number, sw: number, sh: number): ImageData;
+ putImageData(imagedata: ImageData, dx: number, dy: number): void;
+ putImageData(imagedata: ImageData, dx: number, dy: number, dirtyX: number, dirtyY: number, dirtyWidth: number, dirtyHeight: number): void;
+}
+
+interface CanvasImageSmoothing {
+ imageSmoothingEnabled: boolean;
+ imageSmoothingQuality: ImageSmoothingQuality;
+}
+
+interface CanvasPath {
+ arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;
+ arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void;
+ bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void;
+ closePath(): void;
+ ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;
+ lineTo(x: number, y: number): void;
+ moveTo(x: number, y: number): void;
+ quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;
+ rect(x: number, y: number, w: number, h: number): void;
+}
+
+interface CanvasPathDrawingStyles {
+ lineCap: CanvasLineCap;
+ lineDashOffset: number;
+ lineJoin: CanvasLineJoin;
+ lineWidth: number;
+ miterLimit: number;
+ getLineDash(): number[];
+ setLineDash(segments: number[]): void;
+}
+
+/** An opaque object describing a pattern, based on an image, a canvas, or a video, created by the CanvasRenderingContext2D.createPattern() method. */
+interface CanvasPattern {
+ /**
+ * Sets the transformation matrix that will be used when rendering the pattern during a fill or stroke painting operation.
+ */
+ setTransform(transform?: DOMMatrix2DInit): void;
+}
+
+declare var CanvasPattern: {
+ prototype: CanvasPattern;
+ new(): CanvasPattern;
+};
+
+interface CanvasRect {
+ clearRect(x: number, y: number, w: number, h: number): void;
+ fillRect(x: number, y: number, w: number, h: number): void;
+ strokeRect(x: number, y: number, w: number, h: number): void;
+}
+
+/** The CanvasRenderingContext2D interface, part of the Canvas API, provides the 2D rendering context for the drawing surface of a <canvas> element. It is used for drawing shapes, text, images, and other objects. */
+interface CanvasRenderingContext2D extends CanvasCompositing, CanvasDrawImage, CanvasDrawPath, CanvasFillStrokeStyles, CanvasFilters, CanvasImageData, CanvasImageSmoothing, CanvasPath, CanvasPathDrawingStyles, CanvasRect, CanvasShadowStyles, CanvasState, CanvasText, CanvasTextDrawingStyles, CanvasTransform, CanvasUserInterface {
+ readonly canvas: HTMLCanvasElement;
+}
+
+declare var CanvasRenderingContext2D: {
+ prototype: CanvasRenderingContext2D;
+ new(): CanvasRenderingContext2D;
+};
+
+interface CanvasShadowStyles {
+ shadowBlur: number;
+ shadowColor: string;
+ shadowOffsetX: number;
+ shadowOffsetY: number;
+}
+
+interface CanvasState {
+ restore(): void;
+ save(): void;
+}
+
+interface CanvasText {
+ fillText(text: string, x: number, y: number, maxWidth?: number): void;
+ measureText(text: string): TextMetrics;
+ strokeText(text: string, x: number, y: number, maxWidth?: number): void;
+}
+
+interface CanvasTextDrawingStyles {
+ direction: CanvasDirection;
+ font: string;
+ textAlign: CanvasTextAlign;
+ textBaseline: CanvasTextBaseline;
+}
+
+interface CanvasTransform {
+ getTransform(): DOMMatrix;
+ resetTransform(): void;
+ rotate(angle: number): void;
+ scale(x: number, y: number): void;
+ setTransform(a: number, b: number, c: number, d: number, e: number, f: number): void;
+ setTransform(transform?: DOMMatrix2DInit): void;
+ transform(a: number, b: number, c: number, d: number, e: number, f: number): void;
+ translate(x: number, y: number): void;
+}
+
+interface CanvasUserInterface {
+ drawFocusIfNeeded(element: Element): void;
+ drawFocusIfNeeded(path: Path2D, element: Element): void;
+ scrollPathIntoView(): void;
+ scrollPathIntoView(path: Path2D): void;
+}
+
+interface CaretPosition {
+ readonly offset: number;
+ readonly offsetNode: Node;
+ getClientRect(): DOMRect | null;
+}
+
+declare var CaretPosition: {
+ prototype: CaretPosition;
+ new(): CaretPosition;
+};
+
+/** The ChannelMergerNode interface, often used in conjunction with its opposite, ChannelSplitterNode, reunites different mono inputs into a single output. Each input is used to fill a channel of the output. This is useful for accessing each channels separately, e.g. for performing channel mixing where gain must be separately controlled on each channel. */
+interface ChannelMergerNode extends AudioNode {
+}
+
+declare var ChannelMergerNode: {
+ prototype: ChannelMergerNode;
+ new(context: BaseAudioContext, options?: ChannelMergerOptions): ChannelMergerNode;
+};
+
+/** The ChannelSplitterNode interface, often used in conjunction with its opposite, ChannelMergerNode, separates the different channels of an audio source into a set of mono outputs. This is useful for accessing each channel separately, e.g. for performing channel mixing where gain must be separately controlled on each channel. */
+interface ChannelSplitterNode extends AudioNode {
+}
+
+declare var ChannelSplitterNode: {
+ prototype: ChannelSplitterNode;
+ new(context: BaseAudioContext, options?: ChannelSplitterOptions): ChannelSplitterNode;
+};
+
+/** The CharacterData abstract interface represents a Node object that contains characters. This is an abstract interface, meaning there aren't any object of type CharacterData: it is implemented by other interfaces, like Text, Comment, or ProcessingInstruction which aren't abstract. */
+interface CharacterData extends Node, ChildNode, NonDocumentTypeChildNode {
+ data: string;
+ readonly length: number;
+ readonly ownerDocument: Document;
+ appendData(data: string): void;
+ deleteData(offset: number, count: number): void;
+ insertData(offset: number, data: string): void;
+ replaceData(offset: number, count: number, data: string): void;
+ substringData(offset: number, count: number): string;
+}
+
+declare var CharacterData: {
+ prototype: CharacterData;
+ new(): CharacterData;
+};
+
+interface ChildNode extends Node {
+ /**
+ * Inserts nodes just after node, while replacing strings in nodes with equivalent Text nodes.
+ *
+ * Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
+ */
+ after(...nodes: (Node | string)[]): void;
+ /**
+ * Inserts nodes just before node, while replacing strings in nodes with equivalent Text nodes.
+ *
+ * Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
+ */
+ before(...nodes: (Node | string)[]): void;
+ /**
+ * Removes node.
+ */
+ remove(): void;
+ /**
+ * Replaces node with nodes, while replacing strings in nodes with equivalent Text nodes.
+ *
+ * Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
+ */
+ replaceWith(...nodes: (Node | string)[]): void;
+}
+
+interface ClientRect {
+ bottom: number;
+ readonly height: number;
+ left: number;
+ right: number;
+ top: number;
+ readonly width: number;
+}
+
+declare var ClientRect: {
+ prototype: ClientRect;
+ new(): ClientRect;
+};
+
+interface ClientRectList {
+ readonly length: number;
+ item(index: number): ClientRect;
+ [index: number]: ClientRect;
+}
+
+declare var ClientRectList: {
+ prototype: ClientRectList;
+ new(): ClientRectList;
+};
+
+interface Clipboard extends EventTarget {
+ readText(): Promise<string>;
+ writeText(data: string): Promise<void>;
+}
+
+declare var Clipboard: {
+ prototype: Clipboard;
+ new(): Clipboard;
+};
+
+/** Events providing information related to modification of the clipboard, that is cut, copy, and paste events. */
+interface ClipboardEvent extends Event {
+ readonly clipboardData: DataTransfer | null;
+}
+
+declare var ClipboardEvent: {
+ prototype: ClipboardEvent;
+ new(type: string, eventInitDict?: ClipboardEventInit): ClipboardEvent;
+};
+
+/** A CloseEvent is sent to clients using WebSockets when the connection is closed. This is delivered to the listener indicated by the WebSocket object's onclose attribute. */
+interface CloseEvent extends Event {
+ /**
+ * Returns the WebSocket connection close code provided by the server.
+ */
+ readonly code: number;
+ /**
+ * Returns the WebSocket connection close reason provided by the server.
+ */
+ readonly reason: string;
+ /**
+ * Returns true if the connection closed cleanly; false otherwise.
+ */
+ readonly wasClean: boolean;
+}
+
+declare var CloseEvent: {
+ prototype: CloseEvent;
+ new(type: string, eventInitDict?: CloseEventInit): CloseEvent;
+};
+
+/** Textual notations within markup; although it is generally not visually shown, such comments are available to be read in the source view. */
+interface Comment extends CharacterData {
+}
+
+declare var Comment: {
+ prototype: Comment;
+ new(data?: string): Comment;
+};
+
+/** The DOM CompositionEvent represents events that occur due to the user indirectly entering text. */
+interface CompositionEvent extends UIEvent {
+ readonly data: string;
+}
+
+declare var CompositionEvent: {
+ prototype: CompositionEvent;
+ new(type: string, eventInitDict?: CompositionEventInit): CompositionEvent;
+};
+
+interface ConcatParams extends Algorithm {
+ algorithmId: Uint8Array;
+ hash?: string | Algorithm;
+ partyUInfo: Uint8Array;
+ partyVInfo: Uint8Array;
+ privateInfo?: Uint8Array;
+ publicInfo?: Uint8Array;
+}
+
+interface ConstantSourceNode extends AudioScheduledSourceNode {
+ readonly offset: AudioParam;
+ addEventListener<K extends keyof AudioScheduledSourceNodeEventMap>(type: K, listener: (this: ConstantSourceNode, ev: AudioScheduledSourceNodeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof AudioScheduledSourceNodeEventMap>(type: K, listener: (this: ConstantSourceNode, ev: AudioScheduledSourceNodeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var ConstantSourceNode: {
+ prototype: ConstantSourceNode;
+ new(context: BaseAudioContext, options?: ConstantSourceOptions): ConstantSourceNode;
+};
+
+/** An AudioNode that performs a Linear Convolution on a given AudioBuffer, often used to achieve a reverb effect. A ConvolverNode always has exactly one input and one output. */
+interface ConvolverNode extends AudioNode {
+ buffer: AudioBuffer | null;
+ normalize: boolean;
+}
+
+declare var ConvolverNode: {
+ prototype: ConvolverNode;
+ new(context: BaseAudioContext, options?: ConvolverOptions): ConvolverNode;
+};
+
+/** The position and altitude of the device on Earth, as well as the accuracy with which these properties are calculated. */
+interface Coordinates {
+ readonly accuracy: number;
+ readonly altitude: number | null;
+ readonly altitudeAccuracy: number | null;
+ readonly heading: number | null;
+ readonly latitude: number;
+ readonly longitude: number;
+ readonly speed: number | null;
+}
+
+/** This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams. */
+interface CountQueuingStrategy extends QueuingStrategy {
+ highWaterMark: number;
+ size(chunk: any): 1;
+}
+
+declare var CountQueuingStrategy: {
+ prototype: CountQueuingStrategy;
+ new(options: { highWaterMark: number }): CountQueuingStrategy;
+};
+
+interface Credential {
+ readonly id: string;
+ readonly type: string;
+}
+
+declare var Credential: {
+ prototype: Credential;
+ new(): Credential;
+};
+
+interface CredentialsContainer {
+ create(options?: CredentialCreationOptions): Promise<Credential | null>;
+ get(options?: CredentialRequestOptions): Promise<Credential | null>;
+ preventSilentAccess(): Promise<void>;
+ store(credential: Credential): Promise<Credential>;
+}
+
+declare var CredentialsContainer: {
+ prototype: CredentialsContainer;
+ new(): CredentialsContainer;
+};
+
+/** Basic cryptography features available in the current context. It allows access to a cryptographically strong random number generator and to cryptographic primitives. */
+interface Crypto {
+ readonly subtle: SubtleCrypto;
+ getRandomValues<T extends Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | null>(array: T): T;
+}
+
+declare var Crypto: {
+ prototype: Crypto;
+ new(): Crypto;
+};
+
+/** The CryptoKey dictionary of the Web Crypto API represents a cryptographic key. */
+interface CryptoKey {
+ readonly algorithm: KeyAlgorithm;
+ readonly extractable: boolean;
+ readonly type: KeyType;
+ readonly usages: KeyUsage[];
+}
+
+declare var CryptoKey: {
+ prototype: CryptoKey;
+ new(): CryptoKey;
+};
+
+/** The CryptoKeyPair dictionary of the Web Crypto API represents a key pair for an asymmetric cryptography algorithm, also known as a public-key algorithm. */
+interface CryptoKeyPair {
+ privateKey: CryptoKey;
+ publicKey: CryptoKey;
+}
+
+declare var CryptoKeyPair: {
+ prototype: CryptoKeyPair;
+ new(): CryptoKeyPair;
+};
+
+interface CustomElementRegistry {
+ define(name: string, constructor: CustomElementConstructor, options?: ElementDefinitionOptions): void;
+ get(name: string): any;
+ upgrade(root: Node): void;
+ whenDefined(name: string): Promise<void>;
+}
+
+declare var CustomElementRegistry: {
+ prototype: CustomElementRegistry;
+ new(): CustomElementRegistry;
+};
+
+interface CustomEvent<T = any> extends Event {
+ /**
+ * Returns any custom data event was created with. Typically used for synthetic events.
+ */
+ readonly detail: T;
+ initCustomEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, detailArg: T): void;
+}
+
+declare var CustomEvent: {
+ prototype: CustomEvent;
+ new<T>(typeArg: string, eventInitDict?: CustomEventInit<T>): CustomEvent<T>;
+};
+
+/** An error object that contains an error name. */
+interface DOMError {
+ readonly name: string;
+ toString(): string;
+}
+
+declare var DOMError: {
+ prototype: DOMError;
+ new(): DOMError;
+};
+
+/** An abnormal event (called an exception) which occurs as a result of calling a method or accessing a property of a web API. */
+interface DOMException {
+ readonly code: number;
+ readonly message: string;
+ readonly name: string;
+ readonly ABORT_ERR: number;
+ readonly DATA_CLONE_ERR: number;
+ readonly DOMSTRING_SIZE_ERR: number;
+ readonly HIERARCHY_REQUEST_ERR: number;
+ readonly INDEX_SIZE_ERR: number;
+ readonly INUSE_ATTRIBUTE_ERR: number;
+ readonly INVALID_ACCESS_ERR: number;
+ readonly INVALID_CHARACTER_ERR: number;
+ readonly INVALID_MODIFICATION_ERR: number;
+ readonly INVALID_NODE_TYPE_ERR: number;
+ readonly INVALID_STATE_ERR: number;
+ readonly NAMESPACE_ERR: number;
+ readonly NETWORK_ERR: number;
+ readonly NOT_FOUND_ERR: number;
+ readonly NOT_SUPPORTED_ERR: number;
+ readonly NO_DATA_ALLOWED_ERR: number;
+ readonly NO_MODIFICATION_ALLOWED_ERR: number;
+ readonly QUOTA_EXCEEDED_ERR: number;
+ readonly SECURITY_ERR: number;
+ readonly SYNTAX_ERR: number;
+ readonly TIMEOUT_ERR: number;
+ readonly TYPE_MISMATCH_ERR: number;
+ readonly URL_MISMATCH_ERR: number;
+ readonly VALIDATION_ERR: number;
+ readonly WRONG_DOCUMENT_ERR: number;
+}
+
+declare var DOMException: {
+ prototype: DOMException;
+ new(message?: string, name?: string): DOMException;
+ readonly ABORT_ERR: number;
+ readonly DATA_CLONE_ERR: number;
+ readonly DOMSTRING_SIZE_ERR: number;
+ readonly HIERARCHY_REQUEST_ERR: number;
+ readonly INDEX_SIZE_ERR: number;
+ readonly INUSE_ATTRIBUTE_ERR: number;
+ readonly INVALID_ACCESS_ERR: number;
+ readonly INVALID_CHARACTER_ERR: number;
+ readonly INVALID_MODIFICATION_ERR: number;
+ readonly INVALID_NODE_TYPE_ERR: number;
+ readonly INVALID_STATE_ERR: number;
+ readonly NAMESPACE_ERR: number;
+ readonly NETWORK_ERR: number;
+ readonly NOT_FOUND_ERR: number;
+ readonly NOT_SUPPORTED_ERR: number;
+ readonly NO_DATA_ALLOWED_ERR: number;
+ readonly NO_MODIFICATION_ALLOWED_ERR: number;
+ readonly QUOTA_EXCEEDED_ERR: number;
+ readonly SECURITY_ERR: number;
+ readonly SYNTAX_ERR: number;
+ readonly TIMEOUT_ERR: number;
+ readonly TYPE_MISMATCH_ERR: number;
+ readonly URL_MISMATCH_ERR: number;
+ readonly VALIDATION_ERR: number;
+ readonly WRONG_DOCUMENT_ERR: number;
+};
+
+/** An object providing methods which are not dependent on any particular document. Such an object is returned by the Document.implementation property. */
+interface DOMImplementation {
+ createDocument(namespaceURI: string | null, qualifiedName: string | null, doctype: DocumentType | null): Document;
+ createDocumentType(qualifiedName: string, publicId: string, systemId: string): DocumentType;
+ createHTMLDocument(title?: string): Document;
+ /** @deprecated */
+ hasFeature(...args: any[]): true;
+}
+
+declare var DOMImplementation: {
+ prototype: DOMImplementation;
+ new(): DOMImplementation;
+};
+
+interface DOML2DeprecatedColorProperty {
+ color: string;
+}
+
+interface DOMMatrix extends DOMMatrixReadOnly {
+ a: number;
+ b: number;
+ c: number;
+ d: number;
+ e: number;
+ f: number;
+ m11: number;
+ m12: number;
+ m13: number;
+ m14: number;
+ m21: number;
+ m22: number;
+ m23: number;
+ m24: number;
+ m31: number;
+ m32: number;
+ m33: number;
+ m34: number;
+ m41: number;
+ m42: number;
+ m43: number;
+ m44: number;
+ invertSelf(): DOMMatrix;
+ multiplySelf(other?: DOMMatrixInit): DOMMatrix;
+ preMultiplySelf(other?: DOMMatrixInit): DOMMatrix;
+ rotateAxisAngleSelf(x?: number, y?: number, z?: number, angle?: number): DOMMatrix;
+ rotateFromVectorSelf(x?: number, y?: number): DOMMatrix;
+ rotateSelf(rotX?: number, rotY?: number, rotZ?: number): DOMMatrix;
+ scale3dSelf(scale?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix;
+ scaleSelf(scaleX?: number, scaleY?: number, scaleZ?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix;
+ setMatrixValue(transformList: string): DOMMatrix;
+ skewXSelf(sx?: number): DOMMatrix;
+ skewYSelf(sy?: number): DOMMatrix;
+ translateSelf(tx?: number, ty?: number, tz?: number): DOMMatrix;
+}
+
+declare var DOMMatrix: {
+ prototype: DOMMatrix;
+ new(init?: string | number[]): DOMMatrix;
+ fromFloat32Array(array32: Float32Array): DOMMatrix;
+ fromFloat64Array(array64: Float64Array): DOMMatrix;
+ fromMatrix(other?: DOMMatrixInit): DOMMatrix;
+};
+
+type SVGMatrix = DOMMatrix;
+declare var SVGMatrix: typeof DOMMatrix;
+
+type WebKitCSSMatrix = DOMMatrix;
+declare var WebKitCSSMatrix: typeof DOMMatrix;
+
+interface DOMMatrixReadOnly {
+ readonly a: number;
+ readonly b: number;
+ readonly c: number;
+ readonly d: number;
+ readonly e: number;
+ readonly f: number;
+ readonly is2D: boolean;
+ readonly isIdentity: boolean;
+ readonly m11: number;
+ readonly m12: number;
+ readonly m13: number;
+ readonly m14: number;
+ readonly m21: number;
+ readonly m22: number;
+ readonly m23: number;
+ readonly m24: number;
+ readonly m31: number;
+ readonly m32: number;
+ readonly m33: number;
+ readonly m34: number;
+ readonly m41: number;
+ readonly m42: number;
+ readonly m43: number;
+ readonly m44: number;
+ flipX(): DOMMatrix;
+ flipY(): DOMMatrix;
+ inverse(): DOMMatrix;
+ multiply(other?: DOMMatrixInit): DOMMatrix;
+ rotate(rotX?: number, rotY?: number, rotZ?: number): DOMMatrix;
+ rotateAxisAngle(x?: number, y?: number, z?: number, angle?: number): DOMMatrix;
+ rotateFromVector(x?: number, y?: number): DOMMatrix;
+ scale(scaleX?: number, scaleY?: number, scaleZ?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix;
+ scale3d(scale?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix;
+ /** @deprecated */
+ scaleNonUniform(scaleX?: number, scaleY?: number): DOMMatrix;
+ skewX(sx?: number): DOMMatrix;
+ skewY(sy?: number): DOMMatrix;
+ toFloat32Array(): Float32Array;
+ toFloat64Array(): Float64Array;
+ toJSON(): any;
+ transformPoint(point?: DOMPointInit): DOMPoint;
+ translate(tx?: number, ty?: number, tz?: number): DOMMatrix;
+ toString(): string;
+}
+
+declare var DOMMatrixReadOnly: {
+ prototype: DOMMatrixReadOnly;
+ new(init?: string | number[]): DOMMatrixReadOnly;
+ fromFloat32Array(array32: Float32Array): DOMMatrixReadOnly;
+ fromFloat64Array(array64: Float64Array): DOMMatrixReadOnly;
+ fromMatrix(other?: DOMMatrixInit): DOMMatrixReadOnly;
+ toString(): string;
+};
+
+/** Provides the ability to parse XML or HTML source code from a string into a DOM Document. */
+interface DOMParser {
+ parseFromString(str: string, type: SupportedType): Document;
+}
+
+declare var DOMParser: {
+ prototype: DOMParser;
+ new(): DOMParser;
+};
+
+interface DOMPoint extends DOMPointReadOnly {
+ w: number;
+ x: number;
+ y: number;
+ z: number;
+}
+
+declare var DOMPoint: {
+ prototype: DOMPoint;
+ new(x?: number, y?: number, z?: number, w?: number): DOMPoint;
+ fromPoint(other?: DOMPointInit): DOMPoint;
+};
+
+type SVGPoint = DOMPoint;
+declare var SVGPoint: typeof DOMPoint;
+
+interface DOMPointReadOnly {
+ readonly w: number;
+ readonly x: number;
+ readonly y: number;
+ readonly z: number;
+ matrixTransform(matrix?: DOMMatrixInit): DOMPoint;
+ toJSON(): any;
+}
+
+declare var DOMPointReadOnly: {
+ prototype: DOMPointReadOnly;
+ new(x?: number, y?: number, z?: number, w?: number): DOMPointReadOnly;
+ fromPoint(other?: DOMPointInit): DOMPointReadOnly;
+};
+
+interface DOMQuad {
+ readonly p1: DOMPoint;
+ readonly p2: DOMPoint;
+ readonly p3: DOMPoint;
+ readonly p4: DOMPoint;
+ getBounds(): DOMRect;
+ toJSON(): any;
+}
+
+declare var DOMQuad: {
+ prototype: DOMQuad;
+ new(p1?: DOMPointInit, p2?: DOMPointInit, p3?: DOMPointInit, p4?: DOMPointInit): DOMQuad;
+ fromQuad(other?: DOMQuadInit): DOMQuad;
+ fromRect(other?: DOMRectInit): DOMQuad;
+};
+
+interface DOMRect extends DOMRectReadOnly {
+ height: number;
+ width: number;
+ x: number;
+ y: number;
+}
+
+declare var DOMRect: {
+ prototype: DOMRect;
+ new(x?: number, y?: number, width?: number, height?: number): DOMRect;
+ fromRect(other?: DOMRectInit): DOMRect;
+};
+
+type SVGRect = DOMRect;
+declare var SVGRect: typeof DOMRect;
+
+interface DOMRectList {
+ readonly length: number;
+ item(index: number): DOMRect | null;
+ [index: number]: DOMRect;
+}
+
+declare var DOMRectList: {
+ prototype: DOMRectList;
+ new(): DOMRectList;
+};
+
+interface DOMRectReadOnly {
+ readonly bottom: number;
+ readonly height: number;
+ readonly left: number;
+ readonly right: number;
+ readonly top: number;
+ readonly width: number;
+ readonly x: number;
+ readonly y: number;
+ toJSON(): any;
+}
+
+declare var DOMRectReadOnly: {
+ prototype: DOMRectReadOnly;
+ new(x?: number, y?: number, width?: number, height?: number): DOMRectReadOnly;
+ fromRect(other?: DOMRectInit): DOMRectReadOnly;
+};
+
+interface DOMSettableTokenList extends DOMTokenList {
+ value: string;
+}
+
+declare var DOMSettableTokenList: {
+ prototype: DOMSettableTokenList;
+ new(): DOMSettableTokenList;
+};
+
+/** A type returned by some APIs which contains a list of DOMString (strings). */
+interface DOMStringList {
+ /**
+ * Returns the number of strings in strings.
+ */
+ readonly length: number;
+ /**
+ * Returns true if strings contains string, and false otherwise.
+ */
+ contains(string: string): boolean;
+ /**
+ * Returns the string with index index from strings.
+ */
+ item(index: number): string | null;
+ [index: number]: string;
+}
+
+declare var DOMStringList: {
+ prototype: DOMStringList;
+ new(): DOMStringList;
+};
+
+/** Used by the dataset HTML attribute to represent data for custom attributes added to elements. */
+interface DOMStringMap {
+ [name: string]: string | undefined;
+}
+
+declare var DOMStringMap: {
+ prototype: DOMStringMap;
+ new(): DOMStringMap;
+};
+
+/** A set of space-separated tokens. Such a set is returned by Element.classList, HTMLLinkElement.relList, HTMLAnchorElement.relList, HTMLAreaElement.relList, HTMLIframeElement.sandbox, or HTMLOutputElement.htmlFor. It is indexed beginning with 0 as with JavaScript Array objects. DOMTokenList is always case-sensitive. */
+interface DOMTokenList {
+ /**
+ * Returns the number of tokens.
+ */
+ readonly length: number;
+ /**
+ * Returns the associated set as string.
+ *
+ * Can be set, to change the associated attribute.
+ */
+ value: string;
+ toString(): string;
+ /**
+ * Adds all arguments passed, except those already present.
+ *
+ * Throws a "SyntaxError" DOMException if one of the arguments is the empty string.
+ *
+ * Throws an "InvalidCharacterError" DOMException if one of the arguments contains any ASCII whitespace.
+ */
+ add(...tokens: string[]): void;
+ /**
+ * Returns true if token is present, and false otherwise.
+ */
+ contains(token: string): boolean;
+ /**
+ * Returns the token with index index.
+ */
+ item(index: number): string | null;
+ /**
+ * Removes arguments passed, if they are present.
+ *
+ * Throws a "SyntaxError" DOMException if one of the arguments is the empty string.
+ *
+ * Throws an "InvalidCharacterError" DOMException if one of the arguments contains any ASCII whitespace.
+ */
+ remove(...tokens: string[]): void;
+ /**
+ * Replaces token with newToken.
+ *
+ * Returns true if token was replaced with newToken, and false otherwise.
+ *
+ * Throws a "SyntaxError" DOMException if one of the arguments is the empty string.
+ *
+ * Throws an "InvalidCharacterError" DOMException if one of the arguments contains any ASCII whitespace.
+ */
+ replace(oldToken: string, newToken: string): void;
+ /**
+ * Returns true if token is in the associated attribute's supported tokens. Returns false otherwise.
+ *
+ * Throws a TypeError if the associated attribute has no supported tokens defined.
+ */
+ supports(token: string): boolean;
+ /**
+ * If force is not given, "toggles" token, removing it if it's present and adding it if it's not present. If force is true, adds token (same as add()). If force is false, removes token (same as remove()).
+ *
+ * Returns true if token is now present, and false otherwise.
+ *
+ * Throws a "SyntaxError" DOMException if token is empty.
+ *
+ * Throws an "InvalidCharacterError" DOMException if token contains any spaces.
+ */
+ toggle(token: string, force?: boolean): boolean;
+ forEach(callbackfn: (value: string, key: number, parent: DOMTokenList) => void, thisArg?: any): void;
+ [index: number]: string;
+}
+
+declare var DOMTokenList: {
+ prototype: DOMTokenList;
+ new(): DOMTokenList;
+};
+
+interface DataCue extends TextTrackCue {
+ data: ArrayBuffer;
+ addEventListener<K extends keyof TextTrackCueEventMap>(type: K, listener: (this: DataCue, ev: TextTrackCueEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof TextTrackCueEventMap>(type: K, listener: (this: DataCue, ev: TextTrackCueEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var DataCue: {
+ prototype: DataCue;
+ new(): DataCue;
+};
+
+/** Used to hold the data that is being dragged during a drag and drop operation. It may hold one or more data items, each of one or more data types. For more information about drag and drop, see HTML Drag and Drop API. */
+interface DataTransfer {
+ /**
+ * Returns the kind of operation that is currently selected. If the kind of operation isn't one of those that is allowed by the effectAllowed attribute, then the operation will fail.
+ *
+ * Can be set, to change the selected operation.
+ *
+ * The possible values are "none", "copy", "link", and "move".
+ */
+ dropEffect: string;
+ /**
+ * Returns the kinds of operations that are to be allowed.
+ *
+ * Can be set (during the dragstart event), to change the allowed operations.
+ *
+ * The possible values are "none", "copy", "copyLink", "copyMove", "link", "linkMove", "move", "all", and "uninitialized",
+ */
+ effectAllowed: string;
+ /**
+ * Returns a FileList of the files being dragged, if any.
+ */
+ readonly files: FileList;
+ /**
+ * Returns a DataTransferItemList object, with the drag data.
+ */
+ readonly items: DataTransferItemList;
+ /**
+ * Returns a frozen array listing the formats that were set in the dragstart event. In addition, if any files are being dragged, then one of the types will be the string "Files".
+ */
+ readonly types: ReadonlyArray<string>;
+ /**
+ * Removes the data of the specified formats. Removes all data if the argument is omitted.
+ */
+ clearData(format?: string): void;
+ /**
+ * Returns the specified data. If there is no such data, returns the empty string.
+ */
+ getData(format: string): string;
+ /**
+ * Adds the specified data.
+ */
+ setData(format: string, data: string): void;
+ /**
+ * Uses the given element to update the drag feedback, replacing any previously specified feedback.
+ */
+ setDragImage(image: Element, x: number, y: number): void;
+}
+
+declare var DataTransfer: {
+ prototype: DataTransfer;
+ new(): DataTransfer;
+};
+
+/** One drag data item. During a drag operation, each drag event has a dataTransfer property which contains a list of drag data items. Each item in the list is a DataTransferItem object. */
+interface DataTransferItem {
+ /**
+ * Returns the drag data item kind, one of: "string", "file".
+ */
+ readonly kind: string;
+ /**
+ * Returns the drag data item type string.
+ */
+ readonly type: string;
+ /**
+ * Returns a File object, if the drag data item kind is File.
+ */
+ getAsFile(): File | null;
+ /**
+ * Invokes the callback with the string data as the argument, if the drag data item kind is text.
+ */
+ getAsString(callback: FunctionStringCallback | null): void;
+ webkitGetAsEntry(): any;
+}
+
+declare var DataTransferItem: {
+ prototype: DataTransferItem;
+ new(): DataTransferItem;
+};
+
+/** A list of DataTransferItem objects representing items being dragged. During a drag operation, each DragEvent has a dataTransfer property and that property is a DataTransferItemList. */
+interface DataTransferItemList {
+ /**
+ * Returns the number of items in the drag data store.
+ */
+ readonly length: number;
+ /**
+ * Adds a new entry for the given data to the drag data store. If the data is plain text then a type string has to be provided also.
+ */
+ add(data: string, type: string): DataTransferItem | null;
+ add(data: File): DataTransferItem | null;
+ /**
+ * Removes all the entries in the drag data store.
+ */
+ clear(): void;
+ item(index: number): DataTransferItem;
+ /**
+ * Removes the indexth entry in the drag data store.
+ */
+ remove(index: number): void;
+ [name: number]: DataTransferItem;
+}
+
+declare var DataTransferItemList: {
+ prototype: DataTransferItemList;
+ new(): DataTransferItemList;
+};
+
+interface DeferredPermissionRequest {
+ readonly id: number;
+ readonly type: MSWebViewPermissionType;
+ readonly uri: string;
+ allow(): void;
+ deny(): void;
+}
+
+declare var DeferredPermissionRequest: {
+ prototype: DeferredPermissionRequest;
+ new(): DeferredPermissionRequest;
+};
+
+/** A delay-line; an AudioNode audio-processing module that causes a delay between the arrival of an input data and its propagation to the output. */
+interface DelayNode extends AudioNode {
+ readonly delayTime: AudioParam;
+}
+
+declare var DelayNode: {
+ prototype: DelayNode;
+ new(context: BaseAudioContext, options?: DelayOptions): DelayNode;
+};
+
+/** Provides information about the amount of acceleration the device is experiencing along all three axes. */
+interface DeviceAcceleration {
+ readonly x: number | null;
+ readonly y: number | null;
+ readonly z: number | null;
+}
+
+declare var DeviceAcceleration: {
+ prototype: DeviceAcceleration;
+ new(): DeviceAcceleration;
+};
+
+/** The DeviceLightEvent provides web developers with information from photo sensors or similiar detectors about ambient light levels near the device. For example this may be useful to adjust the screen's brightness based on the current ambient light level in order to save energy or provide better readability. */
+interface DeviceLightEvent extends Event {
+ readonly value: number;
+}
+
+declare var DeviceLightEvent: {
+ prototype: DeviceLightEvent;
+ new(typeArg: string, eventInitDict?: DeviceLightEventInit): DeviceLightEvent;
+};
+
+/** The DeviceMotionEvent provides web developers with information about the speed of changes for the device's position and orientation. */
+interface DeviceMotionEvent extends Event {
+ readonly acceleration: DeviceMotionEventAcceleration | null;
+ readonly accelerationIncludingGravity: DeviceMotionEventAcceleration | null;
+ readonly interval: number;
+ readonly rotationRate: DeviceMotionEventRotationRate | null;
+}
+
+declare var DeviceMotionEvent: {
+ prototype: DeviceMotionEvent;
+ new(type: string, eventInitDict?: DeviceMotionEventInit): DeviceMotionEvent;
+ requestPermission(): Promise<PermissionState>;
+};
+
+interface DeviceMotionEventAcceleration {
+ readonly x: number | null;
+ readonly y: number | null;
+ readonly z: number | null;
+}
+
+interface DeviceMotionEventRotationRate {
+ readonly alpha: number | null;
+ readonly beta: number | null;
+ readonly gamma: number | null;
+}
+
+/** The DeviceOrientationEvent provides web developers with information from the physical orientation of the device running the web page. */
+interface DeviceOrientationEvent extends Event {
+ readonly absolute: boolean;
+ readonly alpha: number | null;
+ readonly beta: number | null;
+ readonly gamma: number | null;
+}
+
+declare var DeviceOrientationEvent: {
+ prototype: DeviceOrientationEvent;
+ new(type: string, eventInitDict?: DeviceOrientationEventInit): DeviceOrientationEvent;
+ requestPermission(): Promise<PermissionState>;
+};
+
+/** Provides information about the rate at which the device is rotating around all three axes. */
+interface DeviceRotationRate {
+ readonly alpha: number | null;
+ readonly beta: number | null;
+ readonly gamma: number | null;
+}
+
+declare var DeviceRotationRate: {
+ prototype: DeviceRotationRate;
+ new(): DeviceRotationRate;
+};
+
+interface DhImportKeyParams extends Algorithm {
+ generator: Uint8Array;
+ prime: Uint8Array;
+}
+
+interface DhKeyAlgorithm extends KeyAlgorithm {
+ generator: Uint8Array;
+ prime: Uint8Array;
+}
+
+interface DhKeyDeriveParams extends Algorithm {
+ public: CryptoKey;
+}
+
+interface DhKeyGenParams extends Algorithm {
+ generator: Uint8Array;
+ prime: Uint8Array;
+}
+
+interface DocumentEventMap extends GlobalEventHandlersEventMap, DocumentAndElementEventHandlersEventMap {
+ "fullscreenchange": Event;
+ "fullscreenerror": Event;
+ "pointerlockchange": Event;
+ "pointerlockerror": Event;
+ "readystatechange": Event;
+ "visibilitychange": Event;
+}
+
+/** Any web page loaded in the browser and serves as an entry point into the web page's content, which is the DOM tree. */
+interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShadowRoot, GlobalEventHandlers, NonElementParentNode, ParentNode, XPathEvaluatorBase {
+ /**
+ * Sets or gets the URL for the current document.
+ */
+ readonly URL: string;
+ /**
+ * Sets or gets the color of all active links in the document.
+ */
+ /** @deprecated */
+ alinkColor: string;
+ /**
+ * Returns a reference to the collection of elements contained by the object.
+ */
+ /** @deprecated */
+ readonly all: HTMLAllCollection;
+ /**
+ * Retrieves a collection of all a objects that have a name and/or id property. Objects in this collection are in HTML source order.
+ */
+ /** @deprecated */
+ readonly anchors: HTMLCollectionOf<HTMLAnchorElement>;
+ /**
+ * Retrieves a collection of all applet objects in the document.
+ */
+ /** @deprecated */
+ readonly applets: HTMLCollectionOf<HTMLAppletElement>;
+ /**
+ * Deprecated. Sets or retrieves a value that indicates the background color behind the object.
+ */
+ /** @deprecated */
+ bgColor: string;
+ /**
+ * Specifies the beginning and end of the document body.
+ */
+ body: HTMLElement;
+ /**
+ * Returns document's encoding.
+ */
+ readonly characterSet: string;
+ /**
+ * Gets or sets the character set used to encode the object.
+ */
+ readonly charset: string;
+ /**
+ * Gets a value that indicates whether standards-compliant mode is switched on for the object.
+ */
+ readonly compatMode: string;
+ /**
+ * Returns document's content type.
+ */
+ readonly contentType: string;
+ /**
+ * Returns the HTTP cookies that apply to the Document. If there are no cookies or cookies can't be applied to this resource, the empty string will be returned.
+ *
+ * Can be set, to add a new cookie to the element's set of HTTP cookies.
+ *
+ * If the contents are sandboxed into a unique origin (e.g. in an iframe with the sandbox attribute), a "SecurityError" DOMException will be thrown on getting and setting.
+ */
+ cookie: string;
+ /**
+ * Returns the script element, or the SVG script element, that is currently executing, as long as the element represents a classic script. In the case of reentrant script execution, returns the one that most recently started executing amongst those that have not yet finished executing.
+ *
+ * Returns null if the Document is not currently executing a script or SVG script element (e.g., because the running script is an event handler, or a timeout), or if the currently executing script or SVG script element represents a module script.
+ */
+ readonly currentScript: HTMLOrSVGScriptElement | null;
+ readonly defaultView: (WindowProxy & typeof globalThis) | null;
+ /**
+ * Sets or gets a value that indicates whether the document can be edited.
+ */
+ designMode: string;
+ /**
+ * Sets or retrieves a value that indicates the reading order of the object.
+ */
+ dir: string;
+ /**
+ * Gets an object representing the document type declaration associated with the current document.
+ */
+ readonly doctype: DocumentType | null;
+ /**
+ * Gets a reference to the root node of the document.
+ */
+ readonly documentElement: HTMLElement;
+ /**
+ * Returns document's URL.
+ */
+ readonly documentURI: string;
+ /**
+ * Sets or gets the security domain of the document.
+ */
+ domain: string;
+ /**
+ * Retrieves a collection of all embed objects in the document.
+ */
+ readonly embeds: HTMLCollectionOf<HTMLEmbedElement>;
+ /**
+ * Sets or gets the foreground (text) color of the document.
+ */
+ /** @deprecated */
+ fgColor: string;
+ /**
+ * Retrieves a collection, in source order, of all form objects in the document.
+ */
+ readonly forms: HTMLCollectionOf<HTMLFormElement>;
+ /** @deprecated */
+ readonly fullscreen: boolean;
+ /**
+ * Returns true if document has the ability to display elements fullscreen and fullscreen is supported, or false otherwise.
+ */
+ readonly fullscreenEnabled: boolean;
+ /**
+ * Returns the head element.
+ */
+ readonly head: HTMLHeadElement;
+ readonly hidden: boolean;
+ /**
+ * Retrieves a collection, in source order, of img objects in the document.
+ */
+ readonly images: HTMLCollectionOf<HTMLImageElement>;
+ /**
+ * Gets the implementation object of the current document.
+ */
+ readonly implementation: DOMImplementation;
+ /**
+ * Returns the character encoding used to create the webpage that is loaded into the document object.
+ */
+ readonly inputEncoding: string;
+ /**
+ * Gets the date that the page was last modified, if the page supplies one.
+ */
+ readonly lastModified: string;
+ /**
+ * Sets or gets the color of the document links.
+ */
+ /** @deprecated */
+ linkColor: string;
+ /**
+ * Retrieves a collection of all a objects that specify the href property and all area objects in the document.
+ */
+ readonly links: HTMLCollectionOf<HTMLAnchorElement | HTMLAreaElement>;
+ /**
+ * Contains information about the current URL.
+ */
+ location: Location;
+ onfullscreenchange: ((this: Document, ev: Event) => any) | null;
+ onfullscreenerror: ((this: Document, ev: Event) => any) | null;
+ onpointerlockchange: ((this: Document, ev: Event) => any) | null;
+ onpointerlockerror: ((this: Document, ev: Event) => any) | null;
+ /**
+ * Fires when the state of the object has changed.
+ * @param ev The event
+ */
+ onreadystatechange: ((this: Document, ev: Event) => any) | null;
+ onvisibilitychange: ((this: Document, ev: Event) => any) | null;
+ /**
+ * Returns document's origin.
+ */
+ readonly origin: string;
+ readonly ownerDocument: null;
+ /**
+ * Return an HTMLCollection of the embed elements in the Document.
+ */
+ readonly plugins: HTMLCollectionOf<HTMLEmbedElement>;
+ /**
+ * Retrieves a value that indicates the current state of the object.
+ */
+ readonly readyState: DocumentReadyState;
+ /**
+ * Gets the URL of the location that referred the user to the current page.
+ */
+ readonly referrer: string;
+ /**
+ * Retrieves a collection of all script objects in the document.
+ */
+ readonly scripts: HTMLCollectionOf<HTMLScriptElement>;
+ readonly scrollingElement: Element | null;
+ readonly timeline: DocumentTimeline;
+ /**
+ * Contains the title of the document.
+ */
+ title: string;
+ readonly visibilityState: VisibilityState;
+ /**
+ * Sets or gets the color of the links that the user has visited.
+ */
+ /** @deprecated */
+ vlinkColor: string;
+ /**
+ * Moves node from another document and returns it.
+ *
+ * If node is a document, throws a "NotSupportedError" DOMException or, if node is a shadow root, throws a "HierarchyRequestError" DOMException.
+ */
+ adoptNode<T extends Node>(source: T): T;
+ /** @deprecated */
+ captureEvents(): void;
+ caretPositionFromPoint(x: number, y: number): CaretPosition | null;
+ /** @deprecated */
+ caretRangeFromPoint(x: number, y: number): Range;
+ /** @deprecated */
+ clear(): void;
+ /**
+ * Closes an output stream and forces the sent data to display.
+ */
+ close(): void;
+ /**
+ * Creates an attribute object with a specified name.
+ * @param name String that sets the attribute object's name.
+ */
+ createAttribute(localName: string): Attr;
+ createAttributeNS(namespace: string | null, qualifiedName: string): Attr;
+ /**
+ * Returns a CDATASection node whose data is data.
+ */
+ createCDATASection(data: string): CDATASection;
+ /**
+ * Creates a comment object with the specified data.
+ * @param data Sets the comment object's data.
+ */
+ createComment(data: string): Comment;
+ /**
+ * Creates a new document.
+ */
+ createDocumentFragment(): DocumentFragment;
+ /**
+ * Creates an instance of the element for the specified tag.
+ * @param tagName The name of an element.
+ */
+ createElement<K extends keyof HTMLElementTagNameMap>(tagName: K, options?: ElementCreationOptions): HTMLElementTagNameMap[K];
+ /** @deprecated */
+ createElement<K extends keyof HTMLElementDeprecatedTagNameMap>(tagName: K, options?: ElementCreationOptions): HTMLElementDeprecatedTagNameMap[K];
+ createElement(tagName: string, options?: ElementCreationOptions): HTMLElement;
+ /**
+ * Returns an element with namespace namespace. Its namespace prefix will be everything before ":" (U+003E) in qualifiedName or null. Its local name will be everything after ":" (U+003E) in qualifiedName or qualifiedName.
+ *
+ * If localName does not match the Name production an "InvalidCharacterError" DOMException will be thrown.
+ *
+ * If one of the following conditions is true a "NamespaceError" DOMException will be thrown:
+ *
+ * localName does not match the QName production.
+ * Namespace prefix is not null and namespace is the empty string.
+ * Namespace prefix is "xml" and namespace is not the XML namespace.
+ * qualifiedName or namespace prefix is "xmlns" and namespace is not the XMLNS namespace.
+ * namespace is the XMLNS namespace and neither qualifiedName nor namespace prefix is "xmlns".
+ *
+ * When supplied, options's is can be used to create a customized built-in element.
+ */
+ createElementNS(namespaceURI: "http://www.w3.org/1999/xhtml", qualifiedName: string): HTMLElement;
+ createElementNS<K extends keyof SVGElementTagNameMap>(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: K): SVGElementTagNameMap[K];
+ createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: string): SVGElement;
+ createElementNS(namespaceURI: string | null, qualifiedName: string, options?: ElementCreationOptions): Element;
+ createElementNS(namespace: string | null, qualifiedName: string, options?: string | ElementCreationOptions): Element;
+ createEvent(eventInterface: "AnimationEvent"): AnimationEvent;
+ createEvent(eventInterface: "AnimationPlaybackEvent"): AnimationPlaybackEvent;
+ createEvent(eventInterface: "AudioProcessingEvent"): AudioProcessingEvent;
+ createEvent(eventInterface: "BeforeUnloadEvent"): BeforeUnloadEvent;
+ createEvent(eventInterface: "ClipboardEvent"): ClipboardEvent;
+ createEvent(eventInterface: "CloseEvent"): CloseEvent;
+ createEvent(eventInterface: "CompositionEvent"): CompositionEvent;
+ createEvent(eventInterface: "CustomEvent"): CustomEvent;
+ createEvent(eventInterface: "DeviceLightEvent"): DeviceLightEvent;
+ createEvent(eventInterface: "DeviceMotionEvent"): DeviceMotionEvent;
+ createEvent(eventInterface: "DeviceOrientationEvent"): DeviceOrientationEvent;
+ createEvent(eventInterface: "DragEvent"): DragEvent;
+ createEvent(eventInterface: "ErrorEvent"): ErrorEvent;
+ createEvent(eventInterface: "Event"): Event;
+ createEvent(eventInterface: "Events"): Event;
+ createEvent(eventInterface: "FocusEvent"): FocusEvent;
+ createEvent(eventInterface: "FocusNavigationEvent"): FocusNavigationEvent;
+ createEvent(eventInterface: "GamepadEvent"): GamepadEvent;
+ createEvent(eventInterface: "HashChangeEvent"): HashChangeEvent;
+ createEvent(eventInterface: "IDBVersionChangeEvent"): IDBVersionChangeEvent;
+ createEvent(eventInterface: "InputEvent"): InputEvent;
+ createEvent(eventInterface: "KeyboardEvent"): KeyboardEvent;
+ createEvent(eventInterface: "ListeningStateChangedEvent"): ListeningStateChangedEvent;
+ createEvent(eventInterface: "MSGestureEvent"): MSGestureEvent;
+ createEvent(eventInterface: "MSMediaKeyMessageEvent"): MSMediaKeyMessageEvent;
+ createEvent(eventInterface: "MSMediaKeyNeededEvent"): MSMediaKeyNeededEvent;
+ createEvent(eventInterface: "MSPointerEvent"): MSPointerEvent;
+ createEvent(eventInterface: "MediaEncryptedEvent"): MediaEncryptedEvent;
+ createEvent(eventInterface: "MediaKeyMessageEvent"): MediaKeyMessageEvent;
+ createEvent(eventInterface: "MediaQueryListEvent"): MediaQueryListEvent;
+ createEvent(eventInterface: "MediaStreamErrorEvent"): MediaStreamErrorEvent;
+ createEvent(eventInterface: "MediaStreamEvent"): MediaStreamEvent;
+ createEvent(eventInterface: "MediaStreamTrackEvent"): MediaStreamTrackEvent;
+ createEvent(eventInterface: "MessageEvent"): MessageEvent;
+ createEvent(eventInterface: "MouseEvent"): MouseEvent;
+ createEvent(eventInterface: "MouseEvents"): MouseEvent;
+ createEvent(eventInterface: "MutationEvent"): MutationEvent;
+ createEvent(eventInterface: "MutationEvents"): MutationEvent;
+ createEvent(eventInterface: "OfflineAudioCompletionEvent"): OfflineAudioCompletionEvent;
+ createEvent(eventInterface: "OverflowEvent"): OverflowEvent;
+ createEvent(eventInterface: "PageTransitionEvent"): PageTransitionEvent;
+ createEvent(eventInterface: "PaymentRequestUpdateEvent"): PaymentRequestUpdateEvent;
+ createEvent(eventInterface: "PermissionRequestedEvent"): PermissionRequestedEvent;
+ createEvent(eventInterface: "PointerEvent"): PointerEvent;
+ createEvent(eventInterface: "PopStateEvent"): PopStateEvent;
+ createEvent(eventInterface: "ProgressEvent"): ProgressEvent;
+ createEvent(eventInterface: "PromiseRejectionEvent"): PromiseRejectionEvent;
+ createEvent(eventInterface: "RTCDTMFToneChangeEvent"): RTCDTMFToneChangeEvent;
+ createEvent(eventInterface: "RTCDataChannelEvent"): RTCDataChannelEvent;
+ createEvent(eventInterface: "RTCDtlsTransportStateChangedEvent"): RTCDtlsTransportStateChangedEvent;
+ createEvent(eventInterface: "RTCErrorEvent"): RTCErrorEvent;
+ createEvent(eventInterface: "RTCIceCandidatePairChangedEvent"): RTCIceCandidatePairChangedEvent;
+ createEvent(eventInterface: "RTCIceGathererEvent"): RTCIceGathererEvent;
+ createEvent(eventInterface: "RTCIceTransportStateChangedEvent"): RTCIceTransportStateChangedEvent;
+ createEvent(eventInterface: "RTCPeerConnectionIceErrorEvent"): RTCPeerConnectionIceErrorEvent;
+ createEvent(eventInterface: "RTCPeerConnectionIceEvent"): RTCPeerConnectionIceEvent;
+ createEvent(eventInterface: "RTCSsrcConflictEvent"): RTCSsrcConflictEvent;
+ createEvent(eventInterface: "RTCStatsEvent"): RTCStatsEvent;
+ createEvent(eventInterface: "RTCTrackEvent"): RTCTrackEvent;
+ createEvent(eventInterface: "SVGZoomEvent"): SVGZoomEvent;
+ createEvent(eventInterface: "SVGZoomEvents"): SVGZoomEvent;
+ createEvent(eventInterface: "SecurityPolicyViolationEvent"): SecurityPolicyViolationEvent;
+ createEvent(eventInterface: "ServiceWorkerMessageEvent"): ServiceWorkerMessageEvent;
+ createEvent(eventInterface: "SpeechRecognitionEvent"): SpeechRecognitionEvent;
+ createEvent(eventInterface: "SpeechSynthesisErrorEvent"): SpeechSynthesisErrorEvent;
+ createEvent(eventInterface: "SpeechSynthesisEvent"): SpeechSynthesisEvent;
+ createEvent(eventInterface: "StorageEvent"): StorageEvent;
+ createEvent(eventInterface: "TextEvent"): TextEvent;
+ createEvent(eventInterface: "TouchEvent"): TouchEvent;
+ createEvent(eventInterface: "TrackEvent"): TrackEvent;
+ createEvent(eventInterface: "TransitionEvent"): TransitionEvent;
+ createEvent(eventInterface: "UIEvent"): UIEvent;
+ createEvent(eventInterface: "UIEvents"): UIEvent;
+ createEvent(eventInterface: "VRDisplayEvent"): VRDisplayEvent;
+ createEvent(eventInterface: "VRDisplayEvent "): VRDisplayEvent ;
+ createEvent(eventInterface: "WebGLContextEvent"): WebGLContextEvent;
+ createEvent(eventInterface: "WheelEvent"): WheelEvent;
+ createEvent(eventInterface: string): Event;
+ /**
+ * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.
+ * @param root The root element or node to start traversing on.
+ * @param whatToShow The type of nodes or elements to appear in the node list
+ * @param filter A custom NodeFilter function to use. For more information, see filter. Use null for no filter.
+ * @param entityReferenceExpansion A flag that specifies whether entity reference nodes are expanded.
+ */
+ createNodeIterator(root: Node, whatToShow?: number, filter?: NodeFilter | null): NodeIterator;
+ /**
+ * Returns a ProcessingInstruction node whose target is target and data is data. If target does not match the Name production an "InvalidCharacterError" DOMException will be thrown. If data contains "?>" an "InvalidCharacterError" DOMException will be thrown.
+ */
+ createProcessingInstruction(target: string, data: string): ProcessingInstruction;
+ /**
+ * Returns an empty range object that has both of its boundary points positioned at the beginning of the document.
+ */
+ createRange(): Range;
+ /**
+ * Creates a text string from the specified value.
+ * @param data String that specifies the nodeValue property of the text node.
+ */
+ createTextNode(data: string): Text;
+ /**
+ * Creates a TreeWalker object that you can use to traverse filtered lists of nodes or elements in a document.
+ * @param root The root element or node to start traversing on.
+ * @param whatToShow The type of nodes or elements to appear in the node list. For more information, see whatToShow.
+ * @param filter A custom NodeFilter function to use.
+ * @param entityReferenceExpansion A flag that specifies whether entity reference nodes are expanded.
+ */
+ createTreeWalker(root: Node, whatToShow?: number, filter?: NodeFilter | null): TreeWalker;
+ /** @deprecated */
+ createTreeWalker(root: Node, whatToShow: number, filter: NodeFilter | null, entityReferenceExpansion?: boolean): TreeWalker;
+ /**
+ * Returns the element for the specified x coordinate and the specified y coordinate.
+ * @param x The x-offset
+ * @param y The y-offset
+ */
+ elementFromPoint(x: number, y: number): Element | null;
+ elementsFromPoint(x: number, y: number): Element[];
+ /**
+ * Executes a command on the current document, current selection, or the given range.
+ * @param commandId String that specifies the command to execute. This command can be any of the command identifiers that can be executed in script.
+ * @param showUI Display the user interface, defaults to false.
+ * @param value Value to assign.
+ */
+ execCommand(commandId: string, showUI?: boolean, value?: string): boolean;
+ /**
+ * Stops document's fullscreen element from being displayed fullscreen and resolves promise when done.
+ */
+ exitFullscreen(): Promise<void>;
+ exitPointerLock(): void;
+ getAnimations(): Animation[];
+ /**
+ * Returns a reference to the first object with the specified value of the ID or NAME attribute.
+ * @param elementId String that specifies the ID value. Case-insensitive.
+ */
+ getElementById(elementId: string): HTMLElement | null;
+ /**
+ * Returns a HTMLCollection of the elements in the object on which the method was invoked (a document or an element) that have all the classes given by classNames. The classNames argument is interpreted as a space-separated list of classes.
+ */
+ getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
+ /**
+ * Gets a collection of objects based on the value of the NAME or ID attribute.
+ * @param elementName Gets a collection of objects based on the value of the NAME or ID attribute.
+ */
+ getElementsByName(elementName: string): NodeListOf<HTMLElement>;
+ /**
+ * Retrieves a collection of objects based on the specified element name.
+ * @param name Specifies the name of an element.
+ */
+ getElementsByTagName<K extends keyof HTMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementTagNameMap[K]>;
+ getElementsByTagName<K extends keyof SVGElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<SVGElementTagNameMap[K]>;
+ getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>;
+ /**
+ * If namespace and localName are "*" returns a HTMLCollection of all descendant elements.
+ *
+ * If only namespace is "*" returns a HTMLCollection of all descendant elements whose local name is localName.
+ *
+ * If only localName is "*" returns a HTMLCollection of all descendant elements whose namespace is namespace.
+ *
+ * Otherwise, returns a HTMLCollection of all descendant elements whose namespace is namespace and local name is localName.
+ */
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
+ getElementsByTagNameNS(namespaceURI: string, localName: string): HTMLCollectionOf<Element>;
+ /**
+ * Returns an object representing the current selection of the document that is loaded into the object displaying a webpage.
+ */
+ getSelection(): Selection | null;
+ /**
+ * Gets a value indicating whether the object currently has focus.
+ */
+ hasFocus(): boolean;
+ /**
+ * Returns a copy of node. If deep is true, the copy also includes the node's descendants.
+ *
+ * If node is a document or a shadow root, throws a "NotSupportedError" DOMException.
+ */
+ importNode<T extends Node>(importedNode: T, deep: boolean): T;
+ /**
+ * Opens a new window and loads a document specified by a given URL. Also, opens a new window that uses the url parameter and the name parameter to collect the output of the write method and the writeln method.
+ * @param url Specifies a MIME type for the document.
+ * @param name Specifies the name of the window. This name is used as the value for the TARGET attribute on a form or an anchor element.
+ * @param features Contains a list of items separated by commas. Each item consists of an option and a value, separated by an equals sign (for example, "fullscreen=yes, toolbar=yes"). The following values are supported.
+ * @param replace Specifies whether the existing entry for the document is replaced in the history list.
+ */
+ open(url?: string, name?: string, features?: string, replace?: boolean): Document;
+ /**
+ * Returns a Boolean value that indicates whether a specified command can be successfully executed using execCommand, given the current state of the document.
+ * @param commandId Specifies a command identifier.
+ */
+ queryCommandEnabled(commandId: string): boolean;
+ /**
+ * Returns a Boolean value that indicates whether the specified command is in the indeterminate state.
+ * @param commandId String that specifies a command identifier.
+ */
+ queryCommandIndeterm(commandId: string): boolean;
+ /**
+ * Returns a Boolean value that indicates the current state of the command.
+ * @param commandId String that specifies a command identifier.
+ */
+ queryCommandState(commandId: string): boolean;
+ /**
+ * Returns a Boolean value that indicates whether the current command is supported on the current range.
+ * @param commandId Specifies a command identifier.
+ */
+ queryCommandSupported(commandId: string): boolean;
+ /**
+ * Returns the current value of the document, range, or current selection for the given command.
+ * @param commandId String that specifies a command identifier.
+ */
+ queryCommandValue(commandId: string): string;
+ /** @deprecated */
+ releaseEvents(): void;
+ /**
+ * Writes one or more HTML expressions to a document in the specified window.
+ * @param content Specifies the text and HTML tags to write.
+ */
+ write(...text: string[]): void;
+ /**
+ * Writes one or more HTML expressions, followed by a carriage return, to a document in the specified window.
+ * @param content The text and HTML tags to write.
+ */
+ writeln(...text: string[]): void;
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var Document: {
+ prototype: Document;
+ new(): Document;
+};
+
+interface DocumentAndElementEventHandlersEventMap {
+ "copy": ClipboardEvent;
+ "cut": ClipboardEvent;
+ "paste": ClipboardEvent;
+}
+
+interface DocumentAndElementEventHandlers {
+ oncopy: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null;
+ oncut: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null;
+ onpaste: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null;
+ addEventListener<K extends keyof DocumentAndElementEventHandlersEventMap>(type: K, listener: (this: DocumentAndElementEventHandlers, ev: DocumentAndElementEventHandlersEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof DocumentAndElementEventHandlersEventMap>(type: K, listener: (this: DocumentAndElementEventHandlers, ev: DocumentAndElementEventHandlersEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+interface DocumentEvent {
+ createEvent(eventInterface: "AnimationEvent"): AnimationEvent;
+ createEvent(eventInterface: "AnimationPlaybackEvent"): AnimationPlaybackEvent;
+ createEvent(eventInterface: "AudioProcessingEvent"): AudioProcessingEvent;
+ createEvent(eventInterface: "BeforeUnloadEvent"): BeforeUnloadEvent;
+ createEvent(eventInterface: "ClipboardEvent"): ClipboardEvent;
+ createEvent(eventInterface: "CloseEvent"): CloseEvent;
+ createEvent(eventInterface: "CompositionEvent"): CompositionEvent;
+ createEvent(eventInterface: "CustomEvent"): CustomEvent;
+ createEvent(eventInterface: "DeviceLightEvent"): DeviceLightEvent;
+ createEvent(eventInterface: "DeviceMotionEvent"): DeviceMotionEvent;
+ createEvent(eventInterface: "DeviceOrientationEvent"): DeviceOrientationEvent;
+ createEvent(eventInterface: "DragEvent"): DragEvent;
+ createEvent(eventInterface: "ErrorEvent"): ErrorEvent;
+ createEvent(eventInterface: "Event"): Event;
+ createEvent(eventInterface: "Events"): Event;
+ createEvent(eventInterface: "FocusEvent"): FocusEvent;
+ createEvent(eventInterface: "FocusNavigationEvent"): FocusNavigationEvent;
+ createEvent(eventInterface: "GamepadEvent"): GamepadEvent;
+ createEvent(eventInterface: "HashChangeEvent"): HashChangeEvent;
+ createEvent(eventInterface: "IDBVersionChangeEvent"): IDBVersionChangeEvent;
+ createEvent(eventInterface: "InputEvent"): InputEvent;
+ createEvent(eventInterface: "KeyboardEvent"): KeyboardEvent;
+ createEvent(eventInterface: "ListeningStateChangedEvent"): ListeningStateChangedEvent;
+ createEvent(eventInterface: "MSGestureEvent"): MSGestureEvent;
+ createEvent(eventInterface: "MSMediaKeyMessageEvent"): MSMediaKeyMessageEvent;
+ createEvent(eventInterface: "MSMediaKeyNeededEvent"): MSMediaKeyNeededEvent;
+ createEvent(eventInterface: "MSPointerEvent"): MSPointerEvent;
+ createEvent(eventInterface: "MediaEncryptedEvent"): MediaEncryptedEvent;
+ createEvent(eventInterface: "MediaKeyMessageEvent"): MediaKeyMessageEvent;
+ createEvent(eventInterface: "MediaQueryListEvent"): MediaQueryListEvent;
+ createEvent(eventInterface: "MediaStreamErrorEvent"): MediaStreamErrorEvent;
+ createEvent(eventInterface: "MediaStreamEvent"): MediaStreamEvent;
+ createEvent(eventInterface: "MediaStreamTrackEvent"): MediaStreamTrackEvent;
+ createEvent(eventInterface: "MessageEvent"): MessageEvent;
+ createEvent(eventInterface: "MouseEvent"): MouseEvent;
+ createEvent(eventInterface: "MouseEvents"): MouseEvent;
+ createEvent(eventInterface: "MutationEvent"): MutationEvent;
+ createEvent(eventInterface: "MutationEvents"): MutationEvent;
+ createEvent(eventInterface: "OfflineAudioCompletionEvent"): OfflineAudioCompletionEvent;
+ createEvent(eventInterface: "OverflowEvent"): OverflowEvent;
+ createEvent(eventInterface: "PageTransitionEvent"): PageTransitionEvent;
+ createEvent(eventInterface: "PaymentRequestUpdateEvent"): PaymentRequestUpdateEvent;
+ createEvent(eventInterface: "PermissionRequestedEvent"): PermissionRequestedEvent;
+ createEvent(eventInterface: "PointerEvent"): PointerEvent;
+ createEvent(eventInterface: "PopStateEvent"): PopStateEvent;
+ createEvent(eventInterface: "ProgressEvent"): ProgressEvent;
+ createEvent(eventInterface: "PromiseRejectionEvent"): PromiseRejectionEvent;
+ createEvent(eventInterface: "RTCDTMFToneChangeEvent"): RTCDTMFToneChangeEvent;
+ createEvent(eventInterface: "RTCDataChannelEvent"): RTCDataChannelEvent;
+ createEvent(eventInterface: "RTCDtlsTransportStateChangedEvent"): RTCDtlsTransportStateChangedEvent;
+ createEvent(eventInterface: "RTCErrorEvent"): RTCErrorEvent;
+ createEvent(eventInterface: "RTCIceCandidatePairChangedEvent"): RTCIceCandidatePairChangedEvent;
+ createEvent(eventInterface: "RTCIceGathererEvent"): RTCIceGathererEvent;
+ createEvent(eventInterface: "RTCIceTransportStateChangedEvent"): RTCIceTransportStateChangedEvent;
+ createEvent(eventInterface: "RTCPeerConnectionIceErrorEvent"): RTCPeerConnectionIceErrorEvent;
+ createEvent(eventInterface: "RTCPeerConnectionIceEvent"): RTCPeerConnectionIceEvent;
+ createEvent(eventInterface: "RTCSsrcConflictEvent"): RTCSsrcConflictEvent;
+ createEvent(eventInterface: "RTCStatsEvent"): RTCStatsEvent;
+ createEvent(eventInterface: "RTCTrackEvent"): RTCTrackEvent;
+ createEvent(eventInterface: "SVGZoomEvent"): SVGZoomEvent;
+ createEvent(eventInterface: "SVGZoomEvents"): SVGZoomEvent;
+ createEvent(eventInterface: "SecurityPolicyViolationEvent"): SecurityPolicyViolationEvent;
+ createEvent(eventInterface: "ServiceWorkerMessageEvent"): ServiceWorkerMessageEvent;
+ createEvent(eventInterface: "SpeechRecognitionEvent"): SpeechRecognitionEvent;
+ createEvent(eventInterface: "SpeechSynthesisErrorEvent"): SpeechSynthesisErrorEvent;
+ createEvent(eventInterface: "SpeechSynthesisEvent"): SpeechSynthesisEvent;
+ createEvent(eventInterface: "StorageEvent"): StorageEvent;
+ createEvent(eventInterface: "TextEvent"): TextEvent;
+ createEvent(eventInterface: "TouchEvent"): TouchEvent;
+ createEvent(eventInterface: "TrackEvent"): TrackEvent;
+ createEvent(eventInterface: "TransitionEvent"): TransitionEvent;
+ createEvent(eventInterface: "UIEvent"): UIEvent;
+ createEvent(eventInterface: "UIEvents"): UIEvent;
+ createEvent(eventInterface: "VRDisplayEvent"): VRDisplayEvent;
+ createEvent(eventInterface: "VRDisplayEvent "): VRDisplayEvent ;
+ createEvent(eventInterface: "WebGLContextEvent"): WebGLContextEvent;
+ createEvent(eventInterface: "WheelEvent"): WheelEvent;
+ createEvent(eventInterface: string): Event;
+}
+
+/** A minimal document object that has no parent. It is used as a lightweight version of Document that stores a segment of a document structure comprised of nodes just like a standard document. The key difference is that because the document fragment isn't part of the active document tree structure, changes made to the fragment don't affect the document, cause reflow, or incur any performance impact that can occur when changes are made. */
+interface DocumentFragment extends Node, NonElementParentNode, ParentNode {
+ readonly ownerDocument: Document;
+ getElementById(elementId: string): HTMLElement | null;
+}
+
+declare var DocumentFragment: {
+ prototype: DocumentFragment;
+ new(): DocumentFragment;
+};
+
+interface DocumentOrShadowRoot {
+ readonly activeElement: Element | null;
+ /**
+ * Returns document's fullscreen element.
+ */
+ readonly fullscreenElement: Element | null;
+ readonly pointerLockElement: Element | null;
+ /**
+ * Retrieves a collection of styleSheet objects representing the style sheets that correspond to each instance of a link or style object in the document.
+ */
+ readonly styleSheets: StyleSheetList;
+ caretPositionFromPoint(x: number, y: number): CaretPosition | null;
+ /** @deprecated */
+ caretRangeFromPoint(x: number, y: number): Range;
+ elementFromPoint(x: number, y: number): Element | null;
+ elementsFromPoint(x: number, y: number): Element[];
+ getSelection(): Selection | null;
+}
+
+interface DocumentTimeline extends AnimationTimeline {
+}
+
+declare var DocumentTimeline: {
+ prototype: DocumentTimeline;
+ new(options?: DocumentTimelineOptions): DocumentTimeline;
+};
+
+/** A Node containing a doctype. */
+interface DocumentType extends Node, ChildNode {
+ readonly name: string;
+ readonly ownerDocument: Document;
+ readonly publicId: string;
+ readonly systemId: string;
+}
+
+declare var DocumentType: {
+ prototype: DocumentType;
+ new(): DocumentType;
+};
+
+/** A DOM event that represents a drag and drop interaction. The user initiates a drag by placing a pointer device (such as a mouse) on the touch surface and then dragging the pointer to a new location (such as another DOM element). Applications are free to interpret a drag and drop interaction in an application-specific way. */
+interface DragEvent extends MouseEvent {
+ /**
+ * Returns the DataTransfer object for the event.
+ */
+ readonly dataTransfer: DataTransfer | null;
+}
+
+declare var DragEvent: {
+ prototype: DragEvent;
+ new(type: string, eventInitDict?: DragEventInit): DragEvent;
+};
+
+/** Inherits properties from its parent, AudioNode. */
+interface DynamicsCompressorNode extends AudioNode {
+ readonly attack: AudioParam;
+ readonly knee: AudioParam;
+ readonly ratio: AudioParam;
+ readonly reduction: number;
+ readonly release: AudioParam;
+ readonly threshold: AudioParam;
+}
+
+declare var DynamicsCompressorNode: {
+ prototype: DynamicsCompressorNode;
+ new(context: BaseAudioContext, options?: DynamicsCompressorOptions): DynamicsCompressorNode;
+};
+
+interface EXT_blend_minmax {
+ readonly MAX_EXT: GLenum;
+ readonly MIN_EXT: GLenum;
+}
+
+/** The EXT_frag_depth extension is part of the WebGL API and enables to set a depth value of a fragment from within the fragment shader. */
+interface EXT_frag_depth {
+}
+
+interface EXT_sRGB {
+ readonly FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT: GLenum;
+ readonly SRGB8_ALPHA8_EXT: GLenum;
+ readonly SRGB_ALPHA_EXT: GLenum;
+ readonly SRGB_EXT: GLenum;
+}
+
+interface EXT_shader_texture_lod {
+}
+
+/** The EXT_texture_filter_anisotropic extension is part of the WebGL API and exposes two constants for anisotropic filtering (AF). */
+interface EXT_texture_filter_anisotropic {
+ readonly MAX_TEXTURE_MAX_ANISOTROPY_EXT: GLenum;
+ readonly TEXTURE_MAX_ANISOTROPY_EXT: GLenum;
+}
+
+interface ElementEventMap {
+ "fullscreenchange": Event;
+ "fullscreenerror": Event;
+}
+
+/** Element is the most general base class from which all objects in a Document inherit. It only has methods and properties common to all kinds of elements. More specific classes inherit from Element. */
+interface Element extends Node, Animatable, ChildNode, InnerHTML, NonDocumentTypeChildNode, ParentNode, Slotable {
+ readonly assignedSlot: HTMLSlotElement | null;
+ readonly attributes: NamedNodeMap;
+ /**
+ * Allows for manipulation of element's class content attribute as a set of whitespace-separated tokens through a DOMTokenList object.
+ */
+ readonly classList: DOMTokenList;
+ /**
+ * Returns the value of element's class content attribute. Can be set to change it.
+ */
+ className: string;
+ readonly clientHeight: number;
+ readonly clientLeft: number;
+ readonly clientTop: number;
+ readonly clientWidth: number;
+ /**
+ * Returns the value of element's id content attribute. Can be set to change it.
+ */
+ id: string;
+ /**
+ * Returns the local name.
+ */
+ readonly localName: string;
+ /**
+ * Returns the namespace.
+ */
+ readonly namespaceURI: string | null;
+ onfullscreenchange: ((this: Element, ev: Event) => any) | null;
+ onfullscreenerror: ((this: Element, ev: Event) => any) | null;
+ outerHTML: string;
+ readonly ownerDocument: Document;
+ /**
+ * Returns the namespace prefix.
+ */
+ readonly prefix: string | null;
+ readonly scrollHeight: number;
+ scrollLeft: number;
+ scrollTop: number;
+ readonly scrollWidth: number;
+ /**
+ * Returns element's shadow root, if any, and if shadow root's mode is "open", and null otherwise.
+ */
+ readonly shadowRoot: ShadowRoot | null;
+ /**
+ * Returns the value of element's slot content attribute. Can be set to change it.
+ */
+ slot: string;
+ /**
+ * Returns the HTML-uppercased qualified name.
+ */
+ readonly tagName: string;
+ /**
+ * Creates a shadow root for element and returns it.
+ */
+ attachShadow(init: ShadowRootInit): ShadowRoot;
+ /**
+ * Returns the first (starting at element) inclusive ancestor that matches selectors, and null otherwise.
+ */
+ closest<K extends keyof HTMLElementTagNameMap>(selector: K): HTMLElementTagNameMap[K] | null;
+ closest<K extends keyof SVGElementTagNameMap>(selector: K): SVGElementTagNameMap[K] | null;
+ closest<E extends Element = Element>(selector: string): E | null;
+ /**
+ * Returns element's first attribute whose qualified name is qualifiedName, and null if there is no such attribute otherwise.
+ */
+ getAttribute(qualifiedName: string): string | null;
+ /**
+ * Returns element's attribute whose namespace is namespace and local name is localName, and null if there is no such attribute otherwise.
+ */
+ getAttributeNS(namespace: string | null, localName: string): string | null;
+ /**
+ * Returns the qualified names of all element's attributes. Can contain duplicates.
+ */
+ getAttributeNames(): string[];
+ getAttributeNode(name: string): Attr | null;
+ getAttributeNodeNS(namespaceURI: string, localName: string): Attr | null;
+ getBoundingClientRect(): DOMRect;
+ getClientRects(): DOMRectList;
+ /**
+ * Returns a HTMLCollection of the elements in the object on which the method was invoked (a document or an element) that have all the classes given by classNames. The classNames argument is interpreted as a space-separated list of classes.
+ */
+ getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
+ getElementsByTagName<K extends keyof HTMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementTagNameMap[K]>;
+ getElementsByTagName<K extends keyof SVGElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<SVGElementTagNameMap[K]>;
+ getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>;
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
+ getElementsByTagNameNS(namespaceURI: string, localName: string): HTMLCollectionOf<Element>;
+ /**
+ * Returns true if element has an attribute whose qualified name is qualifiedName, and false otherwise.
+ */
+ hasAttribute(qualifiedName: string): boolean;
+ /**
+ * Returns true if element has an attribute whose namespace is namespace and local name is localName.
+ */
+ hasAttributeNS(namespace: string | null, localName: string): boolean;
+ /**
+ * Returns true if element has attributes, and false otherwise.
+ */
+ hasAttributes(): boolean;
+ hasPointerCapture(pointerId: number): boolean;
+ insertAdjacentElement(position: InsertPosition, insertedElement: Element): Element | null;
+ insertAdjacentHTML(where: InsertPosition, html: string): void;
+ insertAdjacentText(where: InsertPosition, text: string): void;
+ /**
+ * Returns true if matching selectors against element's root yields element, and false otherwise.
+ */
+ matches(selectors: string): boolean;
+ msGetRegionContent(): any;
+ releasePointerCapture(pointerId: number): void;
+ /**
+ * Removes element's first attribute whose qualified name is qualifiedName.
+ */
+ removeAttribute(qualifiedName: string): void;
+ /**
+ * Removes element's attribute whose namespace is namespace and local name is localName.
+ */
+ removeAttributeNS(namespace: string | null, localName: string): void;
+ removeAttributeNode(attr: Attr): Attr;
+ /**
+ * Displays element fullscreen and resolves promise when done.
+ *
+ * When supplied, options's navigationUI member indicates whether showing navigation UI while in fullscreen is preferred or not. If set to "show", navigation simplicity is preferred over screen space, and if set to "hide", more screen space is preferred. User agents are always free to honor user preference over the application's. The default value "auto" indicates no application preference.
+ */
+ requestFullscreen(options?: FullscreenOptions): Promise<void>;
+ requestPointerLock(): void;
+ scroll(options?: ScrollToOptions): void;
+ scroll(x: number, y: number): void;
+ scrollBy(options?: ScrollToOptions): void;
+ scrollBy(x: number, y: number): void;
+ scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void;
+ scrollTo(options?: ScrollToOptions): void;
+ scrollTo(x: number, y: number): void;
+ /**
+ * Sets the value of element's first attribute whose qualified name is qualifiedName to value.
+ */
+ setAttribute(qualifiedName: string, value: string): void;
+ /**
+ * Sets the value of element's attribute whose namespace is namespace and local name is localName to value.
+ */
+ setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void;
+ setAttributeNode(attr: Attr): Attr | null;
+ setAttributeNodeNS(attr: Attr): Attr | null;
+ setPointerCapture(pointerId: number): void;
+ /**
+ * If force is not given, "toggles" qualifiedName, removing it if it is present and adding it if it is not present. If force is true, adds qualifiedName. If force is false, removes qualifiedName.
+ *
+ * Returns true if qualifiedName is now present, and false otherwise.
+ */
+ toggleAttribute(qualifiedName: string, force?: boolean): boolean;
+ webkitMatchesSelector(selectors: string): boolean;
+ addEventListener<K extends keyof ElementEventMap>(type: K, listener: (this: Element, ev: ElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof ElementEventMap>(type: K, listener: (this: Element, ev: ElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var Element: {
+ prototype: Element;
+ new(): Element;
+};
+
+interface ElementCSSInlineStyle {
+ readonly style: CSSStyleDeclaration;
+}
+
+interface ElementContentEditable {
+ contentEditable: string;
+ inputMode: string;
+ readonly isContentEditable: boolean;
+}
+
+/** Events providing information related to errors in scripts or in files. */
+interface ErrorEvent extends Event {
+ readonly colno: number;
+ readonly error: any;
+ readonly filename: string;
+ readonly lineno: number;
+ readonly message: string;
+}
+
+declare var ErrorEvent: {
+ prototype: ErrorEvent;
+ new(type: string, eventInitDict?: ErrorEventInit): ErrorEvent;
+};
+
+/** An event which takes place in the DOM. */
+interface Event {
+ /**
+ * Returns true or false depending on how event was initialized. True if event goes through its target's ancestors in reverse tree order, and false otherwise.
+ */
+ readonly bubbles: boolean;
+ cancelBubble: boolean;
+ /**
+ * Returns true or false depending on how event was initialized. Its return value does not always carry meaning, but true can indicate that part of the operation during which event was dispatched, can be canceled by invoking the preventDefault() method.
+ */
+ readonly cancelable: boolean;
+ /**
+ * Returns true or false depending on how event was initialized. True if event invokes listeners past a ShadowRoot node that is the root of its target, and false otherwise.
+ */
+ readonly composed: boolean;
+ /**
+ * Returns the object whose event listener's callback is currently being invoked.
+ */
+ readonly currentTarget: EventTarget | null;
+ /**
+ * Returns true if preventDefault() was invoked successfully to indicate cancelation, and false otherwise.
+ */
+ readonly defaultPrevented: boolean;
+ /**
+ * Returns the event's phase, which is one of NONE, CAPTURING_PHASE, AT_TARGET, and BUBBLING_PHASE.
+ */
+ readonly eventPhase: number;
+ /**
+ * Returns true if event was dispatched by the user agent, and false otherwise.
+ */
+ readonly isTrusted: boolean;
+ returnValue: boolean;
+ /** @deprecated */
+ readonly srcElement: EventTarget | null;
+ /**
+ * Returns the object to which event is dispatched (its target).
+ */
+ readonly target: EventTarget | null;
+ /**
+ * Returns the event's timestamp as the number of milliseconds measured relative to the time origin.
+ */
+ readonly timeStamp: number;
+ /**
+ * Returns the type of event, e.g. "click", "hashchange", or "submit".
+ */
+ readonly type: string;
+ /**
+ * Returns the invocation target objects of event's path (objects on which listeners will be invoked), except for any nodes in shadow trees of which the shadow root's mode is "closed" that are not reachable from event's currentTarget.
+ */
+ composedPath(): EventTarget[];
+ initEvent(type: string, bubbles?: boolean, cancelable?: boolean): void;
+ /**
+ * If invoked when the cancelable attribute value is true, and while executing a listener for the event with passive set to false, signals to the operation that caused event to be dispatched that it needs to be canceled.
+ */
+ preventDefault(): void;
+ /**
+ * Invoking this method prevents event from reaching any registered event listeners after the current one finishes running and, when dispatched in a tree, also prevents event from reaching any other objects.
+ */
+ stopImmediatePropagation(): void;
+ /**
+ * When dispatched in a tree, invoking this method prevents event from reaching any objects other than the current object.
+ */
+ stopPropagation(): void;
+ readonly AT_TARGET: number;
+ readonly BUBBLING_PHASE: number;
+ readonly CAPTURING_PHASE: number;
+ readonly NONE: number;
+}
+
+declare var Event: {
+ prototype: Event;
+ new(type: string, eventInitDict?: EventInit): Event;
+ readonly AT_TARGET: number;
+ readonly BUBBLING_PHASE: number;
+ readonly CAPTURING_PHASE: number;
+ readonly NONE: number;
+};
+
+interface EventListenerObject {
+ handleEvent(evt: Event): void;
+}
+
+interface EventSourceEventMap {
+ "error": Event;
+ "message": MessageEvent;
+ "open": Event;
+}
+
+interface EventSource extends EventTarget {
+ onerror: ((this: EventSource, ev: Event) => any) | null;
+ onmessage: ((this: EventSource, ev: MessageEvent) => any) | null;
+ onopen: ((this: EventSource, ev: Event) => any) | null;
+ /**
+ * Returns the state of this EventSource object's connection. It can have the values described below.
+ */
+ readonly readyState: number;
+ /**
+ * Returns the URL providing the event stream.
+ */
+ readonly url: string;
+ /**
+ * Returns true if the credentials mode for connection requests to the URL providing the event stream is set to "include", and false otherwise.
+ */
+ readonly withCredentials: boolean;
+ /**
+ * Aborts any instances of the fetch algorithm started for this EventSource object, and sets the readyState attribute to CLOSED.
+ */
+ close(): void;
+ readonly CLOSED: number;
+ readonly CONNECTING: number;
+ readonly OPEN: number;
+ addEventListener<K extends keyof EventSourceEventMap>(type: K, listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof EventSourceEventMap>(type: K, listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var EventSource: {
+ prototype: EventSource;
+ new(url: string, eventSourceInitDict?: EventSourceInit): EventSource;
+ readonly CLOSED: number;
+ readonly CONNECTING: number;
+ readonly OPEN: number;
+};
+
+/** EventTarget is a DOM interface implemented by objects that can receive events and may have listeners for them. */
+interface EventTarget {
+ /**
+ * Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
+ *
+ * The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
+ *
+ * When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
+ *
+ * When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
+ *
+ * When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
+ *
+ * The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
+ */
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject | null, options?: boolean | AddEventListenerOptions): void;
+ /**
+ * Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
+ */
+ dispatchEvent(event: Event): boolean;
+ /**
+ * Removes the event listener in target's event listener list with the same type, callback, and options.
+ */
+ removeEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void;
+}
+
+declare var EventTarget: {
+ prototype: EventTarget;
+ new(): EventTarget;
+};
+
+interface ExtensionScriptApis {
+ extensionIdToShortId(extensionId: string): number;
+ fireExtensionApiTelemetry(functionName: string, isSucceeded: boolean, isSupported: boolean, errorString: string): void;
+ genericFunction(routerAddress: any, parameters?: string, callbackId?: number): void;
+ genericSynchronousFunction(functionId: number, parameters?: string): string;
+ genericWebRuntimeCallout(to: any, from: any, payload: string): void;
+ getExtensionId(): string;
+ registerGenericFunctionCallbackHandler(callbackHandler: Function): void;
+ registerGenericPersistentCallbackHandler(callbackHandler: Function): void;
+ registerWebRuntimeCallbackHandler(handler: Function): any;
+}
+
+declare var ExtensionScriptApis: {
+ prototype: ExtensionScriptApis;
+ new(): ExtensionScriptApis;
+};
+
+interface External {
+ /** @deprecated */
+ AddSearchProvider(): void;
+ /** @deprecated */
+ IsSearchProviderInstalled(): void;
+}
+
+declare var External: {
+ prototype: External;
+ new(): External;
+};
+
+/** Provides information about files and allows JavaScript in a web page to access their content. */
+interface File extends Blob {
+ readonly lastModified: number;
+ readonly name: string;
+}
+
+declare var File: {
+ prototype: File;
+ new(fileBits: BlobPart[], fileName: string, options?: FilePropertyBag): File;
+};
+
+/** An object of this type is returned by the files property of the HTML <input> element; this lets you access the list of files selected with the <input type="file"> element. It's also used for a list of files dropped into web content when using the drag and drop API; see the DataTransfer object for details on this usage. */
+interface FileList {
+ readonly length: number;
+ item(index: number): File | null;
+ [index: number]: File;
+}
+
+declare var FileList: {
+ prototype: FileList;
+ new(): FileList;
+};
+
+interface FileReaderEventMap {
+ "abort": ProgressEvent<FileReader>;
+ "error": ProgressEvent<FileReader>;
+ "load": ProgressEvent<FileReader>;
+ "loadend": ProgressEvent<FileReader>;
+ "loadstart": ProgressEvent<FileReader>;
+ "progress": ProgressEvent<FileReader>;
+}
+
+/** Lets web applications asynchronously read the contents of files (or raw data buffers) stored on the user's computer, using File or Blob objects to specify the file or data to read. */
+interface FileReader extends EventTarget {
+ readonly error: DOMException | null;
+ onabort: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
+ onerror: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
+ onload: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
+ onloadend: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
+ onloadstart: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
+ onprogress: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
+ readonly readyState: number;
+ readonly result: string | ArrayBuffer | null;
+ abort(): void;
+ readAsArrayBuffer(blob: Blob): void;
+ readAsBinaryString(blob: Blob): void;
+ readAsDataURL(blob: Blob): void;
+ readAsText(blob: Blob, encoding?: string): void;
+ readonly DONE: number;
+ readonly EMPTY: number;
+ readonly LOADING: number;
+ addEventListener<K extends keyof FileReaderEventMap>(type: K, listener: (this: FileReader, ev: FileReaderEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof FileReaderEventMap>(type: K, listener: (this: FileReader, ev: FileReaderEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var FileReader: {
+ prototype: FileReader;
+ new(): FileReader;
+ readonly DONE: number;
+ readonly EMPTY: number;
+ readonly LOADING: number;
+};
+
+/** Focus-related events like focus, blur, focusin, or focusout. */
+interface FocusEvent extends UIEvent {
+ readonly relatedTarget: EventTarget | null;
+}
+
+declare var FocusEvent: {
+ prototype: FocusEvent;
+ new(type: string, eventInitDict?: FocusEventInit): FocusEvent;
+};
+
+interface FocusNavigationEvent extends Event {
+ readonly navigationReason: NavigationReason;
+ readonly originHeight: number;
+ readonly originLeft: number;
+ readonly originTop: number;
+ readonly originWidth: number;
+ requestFocus(): void;
+}
+
+declare var FocusNavigationEvent: {
+ prototype: FocusNavigationEvent;
+ new(type: string, eventInitDict?: FocusNavigationEventInit): FocusNavigationEvent;
+};
+
+/** Provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using the XMLHttpRequest.send() method. It uses the same format a form would use if the encoding type were set to "multipart/form-data". */
+interface FormData {
+ append(name: string, value: string | Blob, fileName?: string): void;
+ delete(name: string): void;
+ get(name: string): FormDataEntryValue | null;
+ getAll(name: string): FormDataEntryValue[];
+ has(name: string): boolean;
+ set(name: string, value: string | Blob, fileName?: string): void;
+ forEach(callbackfn: (value: FormDataEntryValue, key: string, parent: FormData) => void, thisArg?: any): void;
+}
+
+declare var FormData: {
+ prototype: FormData;
+ new(form?: HTMLFormElement): FormData;
+};
+
+/** A change in volume. It is an AudioNode audio-processing module that causes a given gain to be applied to the input data before its propagation to the output. A GainNode always has exactly one input and one output, both with the same number of channels. */
+interface GainNode extends AudioNode {
+ readonly gain: AudioParam;
+}
+
+declare var GainNode: {
+ prototype: GainNode;
+ new(context: BaseAudioContext, options?: GainOptions): GainNode;
+};
+
+/** This Gamepad API interface defines an individual gamepad or other controller, allowing access to information such as button presses, axis positions, and id. */
+interface Gamepad {
+ readonly axes: ReadonlyArray<number>;
+ readonly buttons: ReadonlyArray<GamepadButton>;
+ readonly connected: boolean;
+ readonly hand: GamepadHand;
+ readonly hapticActuators: ReadonlyArray<GamepadHapticActuator>;
+ readonly id: string;
+ readonly index: number;
+ readonly mapping: GamepadMappingType;
+ readonly pose: GamepadPose | null;
+ readonly timestamp: number;
+}
+
+declare var Gamepad: {
+ prototype: Gamepad;
+ new(): Gamepad;
+};
+
+/** An individual button of a gamepad or other controller, allowing access to the current state of different types of buttons available on the control device. */
+interface GamepadButton {
+ readonly pressed: boolean;
+ readonly touched: boolean;
+ readonly value: number;
+}
+
+declare var GamepadButton: {
+ prototype: GamepadButton;
+ new(): GamepadButton;
+};
+
+/** This Gamepad API interface contains references to gamepads connected to the system, which is what the gamepad events Window.gamepadconnected and Window.gamepaddisconnected are fired in response to. */
+interface GamepadEvent extends Event {
+ readonly gamepad: Gamepad;
+}
+
+declare var GamepadEvent: {
+ prototype: GamepadEvent;
+ new(type: string, eventInitDict: GamepadEventInit): GamepadEvent;
+};
+
+/** This Gamepad API interface represents hardware in the controller designed to provide haptic feedback to the user (if available), most commonly vibration hardware. */
+interface GamepadHapticActuator {
+ readonly type: GamepadHapticActuatorType;
+ pulse(value: number, duration: number): Promise<boolean>;
+}
+
+declare var GamepadHapticActuator: {
+ prototype: GamepadHapticActuator;
+ new(): GamepadHapticActuator;
+};
+
+/** This Gamepad API interface represents the pose of a WebVR controller at a given timestamp (which includes orientation, position, velocity, and acceleration information.) */
+interface GamepadPose {
+ readonly angularAcceleration: Float32Array | null;
+ readonly angularVelocity: Float32Array | null;
+ readonly hasOrientation: boolean;
+ readonly hasPosition: boolean;
+ readonly linearAcceleration: Float32Array | null;
+ readonly linearVelocity: Float32Array | null;
+ readonly orientation: Float32Array | null;
+ readonly position: Float32Array | null;
+}
+
+declare var GamepadPose: {
+ prototype: GamepadPose;
+ new(): GamepadPose;
+};
+
+interface GenericTransformStream {
+ /**
+ * Returns a readable stream whose chunks are strings resulting from running encoding's decoder on the chunks written to writable.
+ */
+ readonly readable: ReadableStream;
+ /**
+ * Returns a writable stream which accepts [AllowShared] BufferSource chunks and runs them through encoding's decoder before making them available to readable.
+ *
+ * Typically this will be used via the pipeThrough() method on a ReadableStream source.
+ *
+ * ```
+ * var decoder = new TextDecoderStream(encoding);
+ * byteReadable
+ * .pipeThrough(decoder)
+ * .pipeTo(textWritable);
+ * ```
+ *
+ * If the error mode is "fatal" and encoding's decoder returns error, both readable and writable will be errored with a TypeError.
+ */
+ readonly writable: WritableStream;
+}
+
+/** An object able to programmatically obtain the position of the device. It gives Web content access to the location of the device. This allows a Web site or app to offer customized results based on the user's location. */
+interface Geolocation {
+ clearWatch(watchId: number): void;
+ getCurrentPosition(successCallback: PositionCallback, errorCallback?: PositionErrorCallback, options?: PositionOptions): void;
+ watchPosition(successCallback: PositionCallback, errorCallback?: PositionErrorCallback, options?: PositionOptions): number;
+}
+
+interface GlobalEventHandlersEventMap {
+ "abort": UIEvent;
+ "animationcancel": AnimationEvent;
+ "animationend": AnimationEvent;
+ "animationiteration": AnimationEvent;
+ "animationstart": AnimationEvent;
+ "auxclick": MouseEvent;
+ "blur": FocusEvent;
+ "cancel": Event;
+ "canplay": Event;
+ "canplaythrough": Event;
+ "change": Event;
+ "click": MouseEvent;
+ "close": Event;
+ "contextmenu": MouseEvent;
+ "cuechange": Event;
+ "dblclick": MouseEvent;
+ "drag": DragEvent;
+ "dragend": DragEvent;
+ "dragenter": DragEvent;
+ "dragexit": Event;
+ "dragleave": DragEvent;
+ "dragover": DragEvent;
+ "dragstart": DragEvent;
+ "drop": DragEvent;
+ "durationchange": Event;
+ "emptied": Event;
+ "ended": Event;
+ "error": ErrorEvent;
+ "focus": FocusEvent;
+ "focusin": FocusEvent;
+ "focusout": FocusEvent;
+ "gotpointercapture": PointerEvent;
+ "input": Event;
+ "invalid": Event;
+ "keydown": KeyboardEvent;
+ "keypress": KeyboardEvent;
+ "keyup": KeyboardEvent;
+ "load": Event;
+ "loadeddata": Event;
+ "loadedmetadata": Event;
+ "loadstart": Event;
+ "lostpointercapture": PointerEvent;
+ "mousedown": MouseEvent;
+ "mouseenter": MouseEvent;
+ "mouseleave": MouseEvent;
+ "mousemove": MouseEvent;
+ "mouseout": MouseEvent;
+ "mouseover": MouseEvent;
+ "mouseup": MouseEvent;
+ "pause": Event;
+ "play": Event;
+ "playing": Event;
+ "pointercancel": PointerEvent;
+ "pointerdown": PointerEvent;
+ "pointerenter": PointerEvent;
+ "pointerleave": PointerEvent;
+ "pointermove": PointerEvent;
+ "pointerout": PointerEvent;
+ "pointerover": PointerEvent;
+ "pointerup": PointerEvent;
+ "progress": ProgressEvent;
+ "ratechange": Event;
+ "reset": Event;
+ "resize": UIEvent;
+ "scroll": Event;
+ "securitypolicyviolation": SecurityPolicyViolationEvent;
+ "seeked": Event;
+ "seeking": Event;
+ "select": Event;
+ "selectionchange": Event;
+ "selectstart": Event;
+ "stalled": Event;
+ "submit": Event;
+ "suspend": Event;
+ "timeupdate": Event;
+ "toggle": Event;
+ "touchcancel": TouchEvent;
+ "touchend": TouchEvent;
+ "touchmove": TouchEvent;
+ "touchstart": TouchEvent;
+ "transitioncancel": TransitionEvent;
+ "transitionend": TransitionEvent;
+ "transitionrun": TransitionEvent;
+ "transitionstart": TransitionEvent;
+ "volumechange": Event;
+ "waiting": Event;
+ "wheel": WheelEvent;
+}
+
+interface GlobalEventHandlers {
+ /**
+ * Fires when the user aborts the download.
+ * @param ev The event.
+ */
+ onabort: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
+ onanimationcancel: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
+ onanimationend: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
+ onanimationiteration: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
+ onanimationstart: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
+ onauxclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
+ /**
+ * Fires when the object loses the input focus.
+ * @param ev The focus event.
+ */
+ onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
+ oncancel: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /**
+ * Occurs when playback is possible, but would require further buffering.
+ * @param ev The event.
+ */
+ oncanplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ oncanplaythrough: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /**
+ * Fires when the contents of the object or selection have changed.
+ * @param ev The event.
+ */
+ onchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /**
+ * Fires when the user clicks the left mouse button on the object
+ * @param ev The mouse event.
+ */
+ onclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
+ onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /**
+ * Fires when the user clicks the right mouse button in the client area, opening the context menu.
+ * @param ev The mouse event.
+ */
+ oncontextmenu: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
+ oncuechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /**
+ * Fires when the user double-clicks the object.
+ * @param ev The mouse event.
+ */
+ ondblclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
+ /**
+ * Fires on the source object continuously during a drag operation.
+ * @param ev The event.
+ */
+ ondrag: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
+ /**
+ * Fires on the source object when the user releases the mouse at the close of a drag operation.
+ * @param ev The event.
+ */
+ ondragend: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
+ /**
+ * Fires on the target element when the user drags the object to a valid drop target.
+ * @param ev The drag event.
+ */
+ ondragenter: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
+ ondragexit: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /**
+ * Fires on the target object when the user moves the mouse out of a valid drop target during a drag operation.
+ * @param ev The drag event.
+ */
+ ondragleave: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
+ /**
+ * Fires on the target element continuously while the user drags the object over a valid drop target.
+ * @param ev The event.
+ */
+ ondragover: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
+ /**
+ * Fires on the source object when the user starts to drag a text selection or selected object.
+ * @param ev The event.
+ */
+ ondragstart: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
+ ondrop: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
+ /**
+ * Occurs when the duration attribute is updated.
+ * @param ev The event.
+ */
+ ondurationchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /**
+ * Occurs when the media element is reset to its initial state.
+ * @param ev The event.
+ */
+ onemptied: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /**
+ * Occurs when the end of playback is reached.
+ * @param ev The event
+ */
+ onended: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /**
+ * Fires when an error occurs during object loading.
+ * @param ev The event.
+ */
+ onerror: OnErrorEventHandler;
+ /**
+ * Fires when the object receives focus.
+ * @param ev The event.
+ */
+ onfocus: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
+ ongotpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
+ oninput: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ oninvalid: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /**
+ * Fires when the user presses a key.
+ * @param ev The keyboard event
+ */
+ onkeydown: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
+ /**
+ * Fires when the user presses an alphanumeric key.
+ * @param ev The event.
+ */
+ onkeypress: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
+ /**
+ * Fires when the user releases a key.
+ * @param ev The keyboard event
+ */
+ onkeyup: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
+ /**
+ * Fires immediately after the browser loads the object.
+ * @param ev The event.
+ */
+ onload: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /**
+ * Occurs when media data is loaded at the current playback position.
+ * @param ev The event.
+ */
+ onloadeddata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /**
+ * Occurs when the duration and dimensions of the media have been determined.
+ * @param ev The event.
+ */
+ onloadedmetadata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /**
+ * Occurs when Internet Explorer begins looking for media data.
+ * @param ev The event.
+ */
+ onloadstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ onlostpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
+ /**
+ * Fires when the user clicks the object with either mouse button.
+ * @param ev The mouse event.
+ */
+ onmousedown: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
+ onmouseenter: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
+ onmouseleave: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
+ /**
+ * Fires when the user moves the mouse over the object.
+ * @param ev The mouse event.
+ */
+ onmousemove: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
+ /**
+ * Fires when the user moves the mouse pointer outside the boundaries of the object.
+ * @param ev The mouse event.
+ */
+ onmouseout: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
+ /**
+ * Fires when the user moves the mouse pointer into the object.
+ * @param ev The mouse event.
+ */
+ onmouseover: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
+ /**
+ * Fires when the user releases a mouse button while the mouse is over the object.
+ * @param ev The mouse event.
+ */
+ onmouseup: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
+ /**
+ * Occurs when playback is paused.
+ * @param ev The event.
+ */
+ onpause: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /**
+ * Occurs when the play method is requested.
+ * @param ev The event.
+ */
+ onplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /**
+ * Occurs when the audio or video has started playing.
+ * @param ev The event.
+ */
+ onplaying: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ onpointercancel: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
+ onpointerdown: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
+ onpointerenter: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
+ onpointerleave: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
+ onpointermove: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
+ onpointerout: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
+ onpointerover: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
+ onpointerup: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
+ /**
+ * Occurs to indicate progress while downloading media data.
+ * @param ev The event.
+ */
+ onprogress: ((this: GlobalEventHandlers, ev: ProgressEvent) => any) | null;
+ /**
+ * Occurs when the playback rate is increased or decreased.
+ * @param ev The event.
+ */
+ onratechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /**
+ * Fires when the user resets a form.
+ * @param ev The event.
+ */
+ onreset: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ onresize: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
+ /**
+ * Fires when the user repositions the scroll box in the scroll bar on the object.
+ * @param ev The event.
+ */
+ onscroll: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ onsecuritypolicyviolation: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null;
+ /**
+ * Occurs when the seek operation ends.
+ * @param ev The event.
+ */
+ onseeked: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /**
+ * Occurs when the current playback position is moved.
+ * @param ev The event.
+ */
+ onseeking: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /**
+ * Fires when the current selection changes.
+ * @param ev The event.
+ */
+ onselect: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ onselectionchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ onselectstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /**
+ * Occurs when the download has stopped.
+ * @param ev The event.
+ */
+ onstalled: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ onsubmit: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /**
+ * Occurs if the load operation has been intentionally halted.
+ * @param ev The event.
+ */
+ onsuspend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /**
+ * Occurs to indicate the current playback position.
+ * @param ev The event.
+ */
+ ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ ontoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null;
+ ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null;
+ ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null;
+ ontouchstart?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null;
+ ontransitioncancel: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
+ ontransitionend: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
+ ontransitionrun: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
+ ontransitionstart: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
+ /**
+ * Occurs when the volume is changed, or playback is muted or unmuted.
+ * @param ev The event.
+ */
+ onvolumechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ /**
+ * Occurs when playback stops because the next frame of a video resource is not available.
+ * @param ev The event.
+ */
+ onwaiting: ((this: GlobalEventHandlers, ev: Event) => any) | null;
+ onwheel: ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null;
+ addEventListener<K extends keyof GlobalEventHandlersEventMap>(type: K, listener: (this: GlobalEventHandlers, ev: GlobalEventHandlersEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof GlobalEventHandlersEventMap>(type: K, listener: (this: GlobalEventHandlers, ev: GlobalEventHandlersEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+interface HTMLAllCollection {
+ /**
+ * Returns the number of elements in the collection.
+ */
+ readonly length: number;
+ /**
+ * Returns the item with index index from the collection (determined by tree order).
+ */
+ item(nameOrIndex?: string): HTMLCollection | Element | null;
+ /**
+ * Returns the item with ID or name name from the collection.
+ *
+ * If there are multiple matching items, then an HTMLCollection object containing all those elements is returned.
+ *
+ * Only button, form, iframe, input, map, meta, object, select, and textarea elements can have a name for the purpose of this method; their name is given by the value of their name attribute.
+ */
+ namedItem(name: string): HTMLCollection | Element | null;
+ [index: number]: Element;
+}
+
+declare var HTMLAllCollection: {
+ prototype: HTMLAllCollection;
+ new(): HTMLAllCollection;
+};
+
+/** Hyperlink elements and provides special properties and methods (beyond those of the regular HTMLElement object interface that they inherit from) for manipulating the layout and presentation of such elements. */
+interface HTMLAnchorElement extends HTMLElement, HTMLHyperlinkElementUtils {
+ /**
+ * Sets or retrieves the character set used to encode the object.
+ */
+ /** @deprecated */
+ charset: string;
+ /**
+ * Sets or retrieves the coordinates of the object.
+ */
+ /** @deprecated */
+ coords: string;
+ download: string;
+ /**
+ * Sets or retrieves the language code of the object.
+ */
+ hreflang: string;
+ /**
+ * Sets or retrieves the shape of the object.
+ */
+ /** @deprecated */
+ name: string;
+ ping: string;
+ referrerPolicy: string;
+ /**
+ * Sets or retrieves the relationship between the object and the destination of the link.
+ */
+ rel: string;
+ readonly relList: DOMTokenList;
+ /**
+ * Sets or retrieves the relationship between the object and the destination of the link.
+ */
+ /** @deprecated */
+ rev: string;
+ /**
+ * Sets or retrieves the shape of the object.
+ */
+ /** @deprecated */
+ shape: string;
+ /**
+ * Sets or retrieves the window or frame at which to target content.
+ */
+ target: string;
+ /**
+ * Retrieves or sets the text of the object as a string.
+ */
+ text: string;
+ type: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLAnchorElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLAnchorElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLAnchorElement: {
+ prototype: HTMLAnchorElement;
+ new(): HTMLAnchorElement;
+};
+
+interface HTMLAppletElement extends HTMLElement {
+ /** @deprecated */
+ align: string;
+ /**
+ * Sets or retrieves a text alternative to the graphic.
+ */
+ /** @deprecated */
+ alt: string;
+ /**
+ * Sets or retrieves a character string that can be used to implement your own archive functionality for the object.
+ */
+ /** @deprecated */
+ archive: string;
+ /** @deprecated */
+ code: string;
+ /**
+ * Sets or retrieves the URL of the component.
+ */
+ /** @deprecated */
+ codeBase: string;
+ readonly form: HTMLFormElement | null;
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ /** @deprecated */
+ height: string;
+ /** @deprecated */
+ hspace: number;
+ /**
+ * Sets or retrieves the shape of the object.
+ */
+ /** @deprecated */
+ name: string;
+ /** @deprecated */
+ object: string;
+ /** @deprecated */
+ vspace: number;
+ /** @deprecated */
+ width: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLAppletElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLAppletElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLAppletElement: {
+ prototype: HTMLAppletElement;
+ new(): HTMLAppletElement;
+};
+
+/** Provides special properties and methods (beyond those of the regular object HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of <area> elements. */
+interface HTMLAreaElement extends HTMLElement, HTMLHyperlinkElementUtils {
+ /**
+ * Sets or retrieves a text alternative to the graphic.
+ */
+ alt: string;
+ /**
+ * Sets or retrieves the coordinates of the object.
+ */
+ coords: string;
+ download: string;
+ /**
+ * Sets or gets whether clicks in this region cause action.
+ */
+ /** @deprecated */
+ noHref: boolean;
+ ping: string;
+ referrerPolicy: string;
+ rel: string;
+ readonly relList: DOMTokenList;
+ /**
+ * Sets or retrieves the shape of the object.
+ */
+ shape: string;
+ /**
+ * Sets or retrieves the window or frame at which to target content.
+ */
+ target: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLAreaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLAreaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLAreaElement: {
+ prototype: HTMLAreaElement;
+ new(): HTMLAreaElement;
+};
+
+/** Provides access to the properties of <audio> elements, as well as methods to manipulate them. It derives from the HTMLMediaElement interface. */
+interface HTMLAudioElement extends HTMLMediaElement {
+ addEventListener<K extends keyof HTMLMediaElementEventMap>(type: K, listener: (this: HTMLAudioElement, ev: HTMLMediaElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLMediaElementEventMap>(type: K, listener: (this: HTMLAudioElement, ev: HTMLMediaElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLAudioElement: {
+ prototype: HTMLAudioElement;
+ new(): HTMLAudioElement;
+};
+
+/** A HTML line break element (<br>). It inherits from HTMLElement. */
+interface HTMLBRElement extends HTMLElement {
+ /**
+ * Sets or retrieves the side on which floating objects are not to be positioned when any IHTMLBlockElement is inserted into the document.
+ */
+ /** @deprecated */
+ clear: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLBRElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLBRElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLBRElement: {
+ prototype: HTMLBRElement;
+ new(): HTMLBRElement;
+};
+
+/** Contains the base URI for a document. This object inherits all of the properties and methods as described in the HTMLElement interface. */
+interface HTMLBaseElement extends HTMLElement {
+ /**
+ * Gets or sets the baseline URL on which relative links are based.
+ */
+ href: string;
+ /**
+ * Sets or retrieves the window or frame at which to target content.
+ */
+ target: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLBaseElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLBaseElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLBaseElement: {
+ prototype: HTMLBaseElement;
+ new(): HTMLBaseElement;
+};
+
+/** Provides special properties (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating <basefont> elements. */
+interface HTMLBaseFontElement extends HTMLElement, DOML2DeprecatedColorProperty {
+ /**
+ * Sets or retrieves the current typeface family.
+ */
+ /** @deprecated */
+ face: string;
+ /**
+ * Sets or retrieves the font size of the object.
+ */
+ /** @deprecated */
+ size: number;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLBaseFontElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLBaseFontElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLBaseFontElement: {
+ prototype: HTMLBaseFontElement;
+ new(): HTMLBaseFontElement;
+};
+
+interface HTMLBodyElementEventMap extends HTMLElementEventMap, WindowEventHandlersEventMap {
+ "orientationchange": Event;
+}
+
+/** Provides special properties (beyond those inherited from the regular HTMLElement interface) for manipulating <body> elements. */
+interface HTMLBodyElement extends HTMLElement, WindowEventHandlers {
+ /** @deprecated */
+ aLink: string;
+ /** @deprecated */
+ background: string;
+ /** @deprecated */
+ bgColor: string;
+ /** @deprecated */
+ link: string;
+ /** @deprecated */
+ onorientationchange: ((this: HTMLBodyElement, ev: Event) => any) | null;
+ /** @deprecated */
+ text: string;
+ /** @deprecated */
+ vLink: string;
+ addEventListener<K extends keyof HTMLBodyElementEventMap>(type: K, listener: (this: HTMLBodyElement, ev: HTMLBodyElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLBodyElementEventMap>(type: K, listener: (this: HTMLBodyElement, ev: HTMLBodyElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLBodyElement: {
+ prototype: HTMLBodyElement;
+ new(): HTMLBodyElement;
+};
+
+/** Provides properties and methods (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating <button> elements. */
+interface HTMLButtonElement extends HTMLElement {
+ disabled: boolean;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ readonly form: HTMLFormElement | null;
+ /**
+ * Overrides the action attribute (where the data on a form is sent) on the parent form element.
+ */
+ formAction: string;
+ /**
+ * Used to override the encoding (formEnctype attribute) specified on the form element.
+ */
+ formEnctype: string;
+ /**
+ * Overrides the submit method attribute previously specified on a form element.
+ */
+ formMethod: string;
+ /**
+ * Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a "save draft"-type submit option.
+ */
+ formNoValidate: boolean;
+ /**
+ * Overrides the target attribute on a form element.
+ */
+ formTarget: string;
+ readonly labels: NodeListOf<HTMLLabelElement>;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ name: string;
+ /**
+ * Gets the classification and default behavior of the button.
+ */
+ type: string;
+ /**
+ * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
+ */
+ readonly validationMessage: string;
+ /**
+ * Returns a ValidityState object that represents the validity states of an element.
+ */
+ readonly validity: ValidityState;
+ /**
+ * Sets or retrieves the default or selected value of the control.
+ */
+ value: string;
+ /**
+ * Returns whether an element will successfully validate based on forms validation rules and constraints.
+ */
+ readonly willValidate: boolean;
+ /**
+ * Returns whether a form will validate when it is submitted, without having to submit it.
+ */
+ checkValidity(): boolean;
+ reportValidity(): boolean;
+ /**
+ * Sets a custom error message that is displayed when a form is submitted.
+ * @param error Sets a custom error message that is displayed when a form is submitted.
+ */
+ setCustomValidity(error: string): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLButtonElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLButtonElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLButtonElement: {
+ prototype: HTMLButtonElement;
+ new(): HTMLButtonElement;
+};
+
+/** Provides properties and methods for manipulating the layout and presentation of <canvas> elements. The HTMLCanvasElement interface also inherits the properties and methods of the HTMLElement interface. */
+interface HTMLCanvasElement extends HTMLElement {
+ /**
+ * Gets or sets the height of a canvas element on a document.
+ */
+ height: number;
+ /**
+ * Gets or sets the width of a canvas element on a document.
+ */
+ width: number;
+ /**
+ * Returns an object that provides methods and properties for drawing and manipulating images and graphics on a canvas element in a document. A context object includes information about colors, line widths, fonts, and other graphic parameters that can be drawn on a canvas.
+ * @param contextId The identifier (ID) of the type of canvas to create. Internet Explorer 9 and Internet Explorer 10 support only a 2-D context using canvas.getContext("2d"); IE11 Preview also supports 3-D or WebGL context using canvas.getContext("experimental-webgl");
+ */
+ getContext(contextId: "2d", options?: CanvasRenderingContext2DSettings): CanvasRenderingContext2D | null;
+ getContext(contextId: "bitmaprenderer", options?: ImageBitmapRenderingContextSettings): ImageBitmapRenderingContext | null;
+ getContext(contextId: "webgl", options?: WebGLContextAttributes): WebGLRenderingContext | null;
+ getContext(contextId: "webgl2", options?: WebGLContextAttributes): WebGL2RenderingContext | null;
+ getContext(contextId: string, options?: any): RenderingContext | null;
+ toBlob(callback: BlobCallback, type?: string, quality?: any): void;
+ /**
+ * Returns the content of the current canvas as an image that you can use as a source for another canvas or an HTML element.
+ * @param type The standard MIME type for the image format to return. If you do not specify this parameter, the default value is a PNG format image.
+ */
+ toDataURL(type?: string, quality?: any): string;
+ transferControlToOffscreen(): OffscreenCanvas;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLCanvasElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLCanvasElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLCanvasElement: {
+ prototype: HTMLCanvasElement;
+ new(): HTMLCanvasElement;
+};
+
+/** A generic collection (array-like object similar to arguments) of elements (in document order) and offers methods and properties for selecting from the list. */
+interface HTMLCollectionBase {
+ /**
+ * Sets or retrieves the number of objects in a collection.
+ */
+ readonly length: number;
+ /**
+ * Retrieves an object from various collections.
+ */
+ item(index: number): Element | null;
+ [index: number]: Element;
+}
+
+interface HTMLCollection extends HTMLCollectionBase {
+ /**
+ * Retrieves a select object or an object from an options collection.
+ */
+ namedItem(name: string): Element | null;
+}
+
+declare var HTMLCollection: {
+ prototype: HTMLCollection;
+ new(): HTMLCollection;
+};
+
+interface HTMLCollectionOf<T extends Element> extends HTMLCollectionBase {
+ item(index: number): T | null;
+ namedItem(name: string): T | null;
+ [index: number]: T;
+}
+
+/** Provides special properties (beyond those of the regular HTMLElement interface it also has available to it by inheritance) for manipulating definition list (<dl>) elements. */
+interface HTMLDListElement extends HTMLElement {
+ /** @deprecated */
+ compact: boolean;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDListElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDListElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLDListElement: {
+ prototype: HTMLDListElement;
+ new(): HTMLDListElement;
+};
+
+/** Provides special properties (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating <data> elements. */
+interface HTMLDataElement extends HTMLElement {
+ value: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDataElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDataElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLDataElement: {
+ prototype: HTMLDataElement;
+ new(): HTMLDataElement;
+};
+
+/** Provides special properties (beyond the HTMLElement object interface it also has available to it by inheritance) to manipulate <datalist> elements and their content. */
+interface HTMLDataListElement extends HTMLElement {
+ readonly options: HTMLCollectionOf<HTMLOptionElement>;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDataListElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDataListElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLDataListElement: {
+ prototype: HTMLDataListElement;
+ new(): HTMLDataListElement;
+};
+
+interface HTMLDetailsElement extends HTMLElement {
+ open: boolean;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDetailsElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDetailsElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLDetailsElement: {
+ prototype: HTMLDetailsElement;
+ new(): HTMLDetailsElement;
+};
+
+interface HTMLDialogElement extends HTMLElement {
+ open: boolean;
+ returnValue: string;
+ close(returnValue?: string): void;
+ show(): void;
+ showModal(): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDialogElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDialogElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLDialogElement: {
+ prototype: HTMLDialogElement;
+ new(): HTMLDialogElement;
+};
+
+interface HTMLDirectoryElement extends HTMLElement {
+ /** @deprecated */
+ compact: boolean;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDirectoryElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDirectoryElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLDirectoryElement: {
+ prototype: HTMLDirectoryElement;
+ new(): HTMLDirectoryElement;
+};
+
+/** Provides special properties (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating <div> elements. */
+interface HTMLDivElement extends HTMLElement {
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ /** @deprecated */
+ align: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDivElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLDivElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLDivElement: {
+ prototype: HTMLDivElement;
+ new(): HTMLDivElement;
+};
+
+/** The HTMLDocument property of Window objects is an alias that browsers expose for the Document interface object. */
+interface HTMLDocument extends Document {
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: HTMLDocument, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: HTMLDocument, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLDocument: {
+ prototype: HTMLDocument;
+ new(): HTMLDocument;
+};
+
+interface HTMLElementEventMap extends ElementEventMap, GlobalEventHandlersEventMap, DocumentAndElementEventHandlersEventMap {
+}
+
+/** Any HTML element. Some elements directly implement this interface, while others implement it via an interface that inherits it. */
+interface HTMLElement extends Element, DocumentAndElementEventHandlers, ElementCSSInlineStyle, ElementCSSInlineStyle, ElementContentEditable, GlobalEventHandlers, HTMLOrSVGElement {
+ accessKey: string;
+ readonly accessKeyLabel: string;
+ autocapitalize: string;
+ dir: string;
+ draggable: boolean;
+ hidden: boolean;
+ innerText: string;
+ lang: string;
+ readonly offsetHeight: number;
+ readonly offsetLeft: number;
+ readonly offsetParent: Element | null;
+ readonly offsetTop: number;
+ readonly offsetWidth: number;
+ spellcheck: boolean;
+ title: string;
+ translate: boolean;
+ click(): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLElement: {
+ prototype: HTMLElement;
+ new(): HTMLElement;
+};
+
+/** Provides special properties (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating <embed> elements. */
+interface HTMLEmbedElement extends HTMLElement {
+ /** @deprecated */
+ align: string;
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: string;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ /** @deprecated */
+ name: string;
+ /**
+ * Sets or retrieves a URL to be loaded by the object.
+ */
+ src: string;
+ type: string;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: string;
+ getSVGDocument(): Document | null;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLEmbedElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLEmbedElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLEmbedElement: {
+ prototype: HTMLEmbedElement;
+ new(): HTMLEmbedElement;
+};
+
+/** Provides special properties and methods (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of <fieldset> elements. */
+interface HTMLFieldSetElement extends HTMLElement {
+ disabled: boolean;
+ readonly elements: HTMLCollection;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ readonly form: HTMLFormElement | null;
+ name: string;
+ readonly type: string;
+ /**
+ * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
+ */
+ readonly validationMessage: string;
+ /**
+ * Returns a ValidityState object that represents the validity states of an element.
+ */
+ readonly validity: ValidityState;
+ /**
+ * Returns whether an element will successfully validate based on forms validation rules and constraints.
+ */
+ readonly willValidate: boolean;
+ /**
+ * Returns whether a form will validate when it is submitted, without having to submit it.
+ */
+ checkValidity(): boolean;
+ reportValidity(): boolean;
+ /**
+ * Sets a custom error message that is displayed when a form is submitted.
+ * @param error Sets a custom error message that is displayed when a form is submitted.
+ */
+ setCustomValidity(error: string): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLFieldSetElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLFieldSetElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLFieldSetElement: {
+ prototype: HTMLFieldSetElement;
+ new(): HTMLFieldSetElement;
+};
+
+/** Implements the document object model (DOM) representation of the font element. The HTML Font Element <font> defines the font size, font face and color of text. */
+interface HTMLFontElement extends HTMLElement {
+ /** @deprecated */
+ color: string;
+ /**
+ * Sets or retrieves the current typeface family.
+ */
+ /** @deprecated */
+ face: string;
+ /** @deprecated */
+ size: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLFontElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLFontElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLFontElement: {
+ prototype: HTMLFontElement;
+ new(): HTMLFontElement;
+};
+
+/** A collection of HTML form control elements. */
+interface HTMLFormControlsCollection extends HTMLCollectionBase {
+ /**
+ * Returns the item with ID or name name from the collection.
+ *
+ * If there are multiple matching items, then a RadioNodeList object containing all those elements is returned.
+ */
+ namedItem(name: string): RadioNodeList | Element | null;
+}
+
+declare var HTMLFormControlsCollection: {
+ prototype: HTMLFormControlsCollection;
+ new(): HTMLFormControlsCollection;
+};
+
+/** A <form> element in the DOM; it allows access to and in some cases modification of aspects of the form, as well as access to its component elements. */
+interface HTMLFormElement extends HTMLElement {
+ /**
+ * Sets or retrieves a list of character encodings for input data that must be accepted by the server processing the form.
+ */
+ acceptCharset: string;
+ /**
+ * Sets or retrieves the URL to which the form content is sent for processing.
+ */
+ action: string;
+ /**
+ * Specifies whether autocomplete is applied to an editable text field.
+ */
+ autocomplete: string;
+ /**
+ * Retrieves a collection, in source order, of all controls in a given form.
+ */
+ readonly elements: HTMLFormControlsCollection;
+ /**
+ * Sets or retrieves the MIME encoding for the form.
+ */
+ encoding: string;
+ /**
+ * Sets or retrieves the encoding type for the form.
+ */
+ enctype: string;
+ /**
+ * Sets or retrieves the number of objects in a collection.
+ */
+ readonly length: number;
+ /**
+ * Sets or retrieves how to send the form data to the server.
+ */
+ method: string;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ name: string;
+ /**
+ * Designates a form that is not validated when submitted.
+ */
+ noValidate: boolean;
+ /**
+ * Sets or retrieves the window or frame at which to target content.
+ */
+ target: string;
+ /**
+ * Returns whether a form will validate when it is submitted, without having to submit it.
+ */
+ checkValidity(): boolean;
+ reportValidity(): boolean;
+ /**
+ * Fires when the user resets a form.
+ */
+ reset(): void;
+ /**
+ * Fires when a FORM is about to be submitted.
+ */
+ submit(): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLFormElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLFormElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+ [index: number]: Element;
+ [name: string]: any;
+}
+
+declare var HTMLFormElement: {
+ prototype: HTMLFormElement;
+ new(): HTMLFormElement;
+};
+
+interface HTMLFrameElement extends HTMLElement {
+ /**
+ * Retrieves the document object of the page or frame.
+ */
+ /** @deprecated */
+ readonly contentDocument: Document | null;
+ /**
+ * Retrieves the object of the specified.
+ */
+ /** @deprecated */
+ readonly contentWindow: WindowProxy | null;
+ /**
+ * Sets or retrieves whether to display a border for the frame.
+ */
+ /** @deprecated */
+ frameBorder: string;
+ /**
+ * Sets or retrieves a URI to a long description of the object.
+ */
+ /** @deprecated */
+ longDesc: string;
+ /**
+ * Sets or retrieves the top and bottom margin heights before displaying the text in a frame.
+ */
+ /** @deprecated */
+ marginHeight: string;
+ /**
+ * Sets or retrieves the left and right margin widths before displaying the text in a frame.
+ */
+ /** @deprecated */
+ marginWidth: string;
+ /**
+ * Sets or retrieves the frame name.
+ */
+ /** @deprecated */
+ name: string;
+ /**
+ * Sets or retrieves whether the user can resize the frame.
+ */
+ /** @deprecated */
+ noResize: boolean;
+ /**
+ * Sets or retrieves whether the frame can be scrolled.
+ */
+ /** @deprecated */
+ scrolling: string;
+ /**
+ * Sets or retrieves a URL to be loaded by the object.
+ */
+ /** @deprecated */
+ src: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLFrameElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLFrameElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLFrameElement: {
+ prototype: HTMLFrameElement;
+ new(): HTMLFrameElement;
+};
+
+interface HTMLFrameSetElementEventMap extends HTMLElementEventMap, WindowEventHandlersEventMap {
+}
+
+/** Provides special properties (beyond those of the regular HTMLElement interface they also inherit) for manipulating <frameset> elements. */
+interface HTMLFrameSetElement extends HTMLElement, WindowEventHandlers {
+ /**
+ * Sets or retrieves the frame widths of the object.
+ */
+ /** @deprecated */
+ cols: string;
+ /**
+ * Sets or retrieves the frame heights of the object.
+ */
+ /** @deprecated */
+ rows: string;
+ addEventListener<K extends keyof HTMLFrameSetElementEventMap>(type: K, listener: (this: HTMLFrameSetElement, ev: HTMLFrameSetElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLFrameSetElementEventMap>(type: K, listener: (this: HTMLFrameSetElement, ev: HTMLFrameSetElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLFrameSetElement: {
+ prototype: HTMLFrameSetElement;
+ new(): HTMLFrameSetElement;
+};
+
+/** Provides special properties (beyond those of the HTMLElement interface it also has available to it by inheritance) for manipulating <hr> elements. */
+interface HTMLHRElement extends HTMLElement {
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ /** @deprecated */
+ align: string;
+ /** @deprecated */
+ color: string;
+ /**
+ * Sets or retrieves whether the horizontal rule is drawn with 3-D shading.
+ */
+ /** @deprecated */
+ noShade: boolean;
+ /** @deprecated */
+ size: string;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ /** @deprecated */
+ width: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLHRElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLHRElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLHRElement: {
+ prototype: HTMLHRElement;
+ new(): HTMLHRElement;
+};
+
+/** Contains the descriptive information, or metadata, for a document. This object inherits all of the properties and methods described in the HTMLElement interface. */
+interface HTMLHeadElement extends HTMLElement {
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLHeadElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLHeadElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLHeadElement: {
+ prototype: HTMLHeadElement;
+ new(): HTMLHeadElement;
+};
+
+/** The different heading elements. It inherits methods and properties from the HTMLElement interface. */
+interface HTMLHeadingElement extends HTMLElement {
+ /**
+ * Sets or retrieves a value that indicates the table alignment.
+ */
+ /** @deprecated */
+ align: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLHeadingElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLHeadingElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLHeadingElement: {
+ prototype: HTMLHeadingElement;
+ new(): HTMLHeadingElement;
+};
+
+/** Serves as the root node for a given HTML document. This object inherits the properties and methods described in the HTMLElement interface. */
+interface HTMLHtmlElement extends HTMLElement {
+ /**
+ * Sets or retrieves the DTD version that governs the current document.
+ */
+ /** @deprecated */
+ version: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLHtmlElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLHtmlElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLHtmlElement: {
+ prototype: HTMLHtmlElement;
+ new(): HTMLHtmlElement;
+};
+
+interface HTMLHyperlinkElementUtils {
+ hash: string;
+ host: string;
+ hostname: string;
+ href: string;
+ toString(): string;
+ readonly origin: string;
+ password: string;
+ pathname: string;
+ port: string;
+ protocol: string;
+ search: string;
+ username: string;
+}
+
+/** Provides special properties and methods (beyond those of the HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of inline frame elements. */
+interface HTMLIFrameElement extends HTMLElement {
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ /** @deprecated */
+ align: string;
+ allow: string;
+ allowFullscreen: boolean;
+ allowPaymentRequest: boolean;
+ /**
+ * Retrieves the document object of the page or frame.
+ */
+ readonly contentDocument: Document | null;
+ /**
+ * Retrieves the object of the specified.
+ */
+ readonly contentWindow: WindowProxy | null;
+ /**
+ * Sets or retrieves whether to display a border for the frame.
+ */
+ /** @deprecated */
+ frameBorder: string;
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: string;
+ /**
+ * Sets or retrieves a URI to a long description of the object.
+ */
+ /** @deprecated */
+ longDesc: string;
+ /**
+ * Sets or retrieves the top and bottom margin heights before displaying the text in a frame.
+ */
+ /** @deprecated */
+ marginHeight: string;
+ /**
+ * Sets or retrieves the left and right margin widths before displaying the text in a frame.
+ */
+ /** @deprecated */
+ marginWidth: string;
+ /**
+ * Sets or retrieves the frame name.
+ */
+ name: string;
+ referrerPolicy: ReferrerPolicy;
+ readonly sandbox: DOMTokenList;
+ /**
+ * Sets or retrieves whether the frame can be scrolled.
+ */
+ /** @deprecated */
+ scrolling: string;
+ /**
+ * Sets or retrieves a URL to be loaded by the object.
+ */
+ src: string;
+ /**
+ * Sets or retrives the content of the page that is to contain.
+ */
+ srcdoc: string;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: string;
+ getSVGDocument(): Document | null;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLIFrameElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLIFrameElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLIFrameElement: {
+ prototype: HTMLIFrameElement;
+ new(): HTMLIFrameElement;
+};
+
+/** Provides special properties and methods for manipulating <img> elements. */
+interface HTMLImageElement extends HTMLElement {
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ /** @deprecated */
+ align: string;
+ /**
+ * Sets or retrieves a text alternative to the graphic.
+ */
+ alt: string;
+ /**
+ * Specifies the properties of a border drawn around an object.
+ */
+ /** @deprecated */
+ border: string;
+ /**
+ * Retrieves whether the object is fully loaded.
+ */
+ readonly complete: boolean;
+ crossOrigin: string | null;
+ readonly currentSrc: string;
+ decoding: "async" | "sync" | "auto";
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: number;
+ /**
+ * Sets or retrieves the width of the border to draw around the object.
+ */
+ /** @deprecated */
+ hspace: number;
+ /**
+ * Sets or retrieves whether the image is a server-side image map.
+ */
+ isMap: boolean;
+ /**
+ * Sets or retrieves a Uniform Resource Identifier (URI) to a long description of the object.
+ */
+ /** @deprecated */
+ longDesc: string;
+ /** @deprecated */
+ lowsrc: string;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ /** @deprecated */
+ name: string;
+ /**
+ * The original height of the image resource before sizing.
+ */
+ readonly naturalHeight: number;
+ /**
+ * The original width of the image resource before sizing.
+ */
+ readonly naturalWidth: number;
+ referrerPolicy: string;
+ sizes: string;
+ /**
+ * The address or URL of the a media resource that is to be considered.
+ */
+ src: string;
+ srcset: string;
+ /**
+ * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.
+ */
+ useMap: string;
+ /**
+ * Sets or retrieves the vertical margin for the object.
+ */
+ /** @deprecated */
+ vspace: number;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: number;
+ readonly x: number;
+ readonly y: number;
+ decode(): Promise<void>;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLImageElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLImageElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLImageElement: {
+ prototype: HTMLImageElement;
+ new(): HTMLImageElement;
+};
+
+/** Provides special properties and methods for manipulating the options, layout, and presentation of <input> elements. */
+interface HTMLInputElement extends HTMLElement {
+ /**
+ * Sets or retrieves a comma-separated list of content types.
+ */
+ accept: string;
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ /** @deprecated */
+ align: string;
+ /**
+ * Sets or retrieves a text alternative to the graphic.
+ */
+ alt: string;
+ /**
+ * Specifies whether autocomplete is applied to an editable text field.
+ */
+ autocomplete: string;
+ /**
+ * Sets or retrieves the state of the check box or radio button.
+ */
+ checked: boolean;
+ /**
+ * Sets or retrieves the state of the check box or radio button.
+ */
+ defaultChecked: boolean;
+ /**
+ * Sets or retrieves the initial contents of the object.
+ */
+ defaultValue: string;
+ dirName: string;
+ disabled: boolean;
+ /**
+ * Returns a FileList object on a file type input object.
+ */
+ files: FileList | null;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ readonly form: HTMLFormElement | null;
+ /**
+ * Overrides the action attribute (where the data on a form is sent) on the parent form element.
+ */
+ formAction: string;
+ /**
+ * Used to override the encoding (formEnctype attribute) specified on the form element.
+ */
+ formEnctype: string;
+ /**
+ * Overrides the submit method attribute previously specified on a form element.
+ */
+ formMethod: string;
+ /**
+ * Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a "save draft"-type submit option.
+ */
+ formNoValidate: boolean;
+ /**
+ * Overrides the target attribute on a form element.
+ */
+ formTarget: string;
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: number;
+ indeterminate: boolean;
+ readonly labels: NodeListOf<HTMLLabelElement> | null;
+ /**
+ * Specifies the ID of a pre-defined datalist of options for an input element.
+ */
+ readonly list: HTMLElement | null;
+ /**
+ * Defines the maximum acceptable value for an input element with type="number".When used with the min and step attributes, lets you control the range and increment (such as only even numbers) that the user can enter into an input field.
+ */
+ max: string;
+ /**
+ * Sets or retrieves the maximum number of characters that the user can enter in a text control.
+ */
+ maxLength: number;
+ /**
+ * Defines the minimum acceptable value for an input element with type="number". When used with the max and step attributes, lets you control the range and increment (such as even numbers only) that the user can enter into an input field.
+ */
+ min: string;
+ minLength: number;
+ /**
+ * Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list.
+ */
+ multiple: boolean;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ name: string;
+ /**
+ * Gets or sets a string containing a regular expression that the user's input must match.
+ */
+ pattern: string;
+ /**
+ * Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field.
+ */
+ placeholder: string;
+ readOnly: boolean;
+ /**
+ * When present, marks an element that can't be submitted without a value.
+ */
+ required: boolean;
+ selectionDirection: "forward" | "backward" | "none" | null;
+ /**
+ * Gets or sets the end position or offset of a text selection.
+ */
+ selectionEnd: number | null;
+ /**
+ * Gets or sets the starting position or offset of a text selection.
+ */
+ selectionStart: number | null;
+ size: number;
+ /**
+ * The address or URL of the a media resource that is to be considered.
+ */
+ src: string;
+ /**
+ * Defines an increment or jump between values that you want to allow the user to enter. When used with the max and min attributes, lets you control the range and increment (for example, allow only even numbers) that the user can enter into an input field.
+ */
+ step: string;
+ /**
+ * Returns the content type of the object.
+ */
+ type: string;
+ /**
+ * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.
+ */
+ /** @deprecated */
+ useMap: string;
+ /**
+ * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
+ */
+ readonly validationMessage: string;
+ /**
+ * Returns a ValidityState object that represents the validity states of an element.
+ */
+ readonly validity: ValidityState;
+ /**
+ * Returns the value of the data at the cursor's current position.
+ */
+ value: string;
+ /**
+ * Returns a Date object representing the form control's value, if applicable; otherwise, returns null. Can be set, to change the value. Throws an "InvalidStateError" DOMException if the control isn't date- or time-based.
+ */
+ valueAsDate: Date | null;
+ /**
+ * Returns the input field value as a number.
+ */
+ valueAsNumber: number;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: number;
+ /**
+ * Returns whether an element will successfully validate based on forms validation rules and constraints.
+ */
+ readonly willValidate: boolean;
+ /**
+ * Returns whether a form will validate when it is submitted, without having to submit it.
+ */
+ checkValidity(): boolean;
+ reportValidity(): boolean;
+ /**
+ * Makes the selection equal to the current object.
+ */
+ select(): void;
+ /**
+ * Sets a custom error message that is displayed when a form is submitted.
+ * @param error Sets a custom error message that is displayed when a form is submitted.
+ */
+ setCustomValidity(error: string): void;
+ setRangeText(replacement: string): void;
+ setRangeText(replacement: string, start: number, end: number, selectionMode?: SelectionMode): void;
+ /**
+ * Sets the start and end positions of a selection in a text field.
+ * @param start The offset into the text field for the start of the selection.
+ * @param end The offset into the text field for the end of the selection.
+ * @param direction The direction in which the selection is performed.
+ */
+ setSelectionRange(start: number, end: number, direction?: "forward" | "backward" | "none"): void;
+ /**
+ * Decrements a range input control's value by the value given by the Step attribute. If the optional parameter is used, it will decrement the input control's step value multiplied by the parameter's value.
+ * @param n Value to decrement the value by.
+ */
+ stepDown(n?: number): void;
+ /**
+ * Increments a range input control's value by the value given by the Step attribute. If the optional parameter is used, will increment the input control's value by that value.
+ * @param n Value to increment the value by.
+ */
+ stepUp(n?: number): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLInputElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLInputElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLInputElement: {
+ prototype: HTMLInputElement;
+ new(): HTMLInputElement;
+};
+
+/** Exposes specific properties and methods (beyond those defined by regular HTMLElement interface it also has available to it by inheritance) for manipulating list elements. */
+interface HTMLLIElement extends HTMLElement {
+ /** @deprecated */
+ type: string;
+ /**
+ * Sets or retrieves the value of a list item.
+ */
+ value: number;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLLIElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLLIElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLLIElement: {
+ prototype: HTMLLIElement;
+ new(): HTMLLIElement;
+};
+
+/** Gives access to properties specific to <label> elements. It inherits methods and properties from the base HTMLElement interface. */
+interface HTMLLabelElement extends HTMLElement {
+ readonly control: HTMLElement | null;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ readonly form: HTMLFormElement | null;
+ /**
+ * Sets or retrieves the object to which the given label object is assigned.
+ */
+ htmlFor: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLLabelElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLLabelElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLLabelElement: {
+ prototype: HTMLLabelElement;
+ new(): HTMLLabelElement;
+};
+
+/** The HTMLLegendElement is an interface allowing to access properties of the <legend> elements. It inherits properties and methods from the HTMLElement interface. */
+interface HTMLLegendElement extends HTMLElement {
+ /** @deprecated */
+ align: string;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ readonly form: HTMLFormElement | null;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLLegendElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLLegendElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLLegendElement: {
+ prototype: HTMLLegendElement;
+ new(): HTMLLegendElement;
+};
+
+/** Reference information for external resources and the relationship of those resources to a document and vice-versa. This object inherits all of the properties and methods of the HTMLElement interface. */
+interface HTMLLinkElement extends HTMLElement, LinkStyle {
+ as: string;
+ /**
+ * Sets or retrieves the character set used to encode the object.
+ */
+ /** @deprecated */
+ charset: string;
+ crossOrigin: string | null;
+ disabled: boolean;
+ /**
+ * Sets or retrieves a destination URL or an anchor point.
+ */
+ href: string;
+ /**
+ * Sets or retrieves the language code of the object.
+ */
+ hreflang: string;
+ imageSizes: string;
+ imageSrcset: string;
+ integrity: string;
+ /**
+ * Sets or retrieves the media type.
+ */
+ media: string;
+ referrerPolicy: string;
+ /**
+ * Sets or retrieves the relationship between the object and the destination of the link.
+ */
+ rel: string;
+ readonly relList: DOMTokenList;
+ /**
+ * Sets or retrieves the relationship between the object and the destination of the link.
+ */
+ /** @deprecated */
+ rev: string;
+ readonly sizes: DOMTokenList;
+ /**
+ * Sets or retrieves the window or frame at which to target content.
+ */
+ /** @deprecated */
+ target: string;
+ /**
+ * Sets or retrieves the MIME type of the object.
+ */
+ type: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLLinkElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLLinkElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLLinkElement: {
+ prototype: HTMLLinkElement;
+ new(): HTMLLinkElement;
+};
+
+/** Provides special properties and methods (beyond those of the regular object HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of map elements. */
+interface HTMLMapElement extends HTMLElement {
+ /**
+ * Retrieves a collection of the area objects defined for the given map object.
+ */
+ readonly areas: HTMLCollection;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ name: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLMapElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLMapElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLMapElement: {
+ prototype: HTMLMapElement;
+ new(): HTMLMapElement;
+};
+
+interface HTMLMarqueeElementEventMap extends HTMLElementEventMap {
+ "bounce": Event;
+ "finish": Event;
+ "start": Event;
+}
+
+/** Provides methods to manipulate <marquee> elements. */
+interface HTMLMarqueeElement extends HTMLElement {
+ /** @deprecated */
+ behavior: string;
+ /** @deprecated */
+ bgColor: string;
+ /** @deprecated */
+ direction: string;
+ /** @deprecated */
+ height: string;
+ /** @deprecated */
+ hspace: number;
+ /** @deprecated */
+ loop: number;
+ /** @deprecated */
+ onbounce: ((this: HTMLMarqueeElement, ev: Event) => any) | null;
+ /** @deprecated */
+ onfinish: ((this: HTMLMarqueeElement, ev: Event) => any) | null;
+ /** @deprecated */
+ onstart: ((this: HTMLMarqueeElement, ev: Event) => any) | null;
+ /** @deprecated */
+ scrollAmount: number;
+ /** @deprecated */
+ scrollDelay: number;
+ /** @deprecated */
+ trueSpeed: boolean;
+ /** @deprecated */
+ vspace: number;
+ /** @deprecated */
+ width: string;
+ /** @deprecated */
+ start(): void;
+ /** @deprecated */
+ stop(): void;
+ addEventListener<K extends keyof HTMLMarqueeElementEventMap>(type: K, listener: (this: HTMLMarqueeElement, ev: HTMLMarqueeElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLMarqueeElementEventMap>(type: K, listener: (this: HTMLMarqueeElement, ev: HTMLMarqueeElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLMarqueeElement: {
+ prototype: HTMLMarqueeElement;
+ new(): HTMLMarqueeElement;
+};
+
+interface HTMLMediaElementEventMap extends HTMLElementEventMap {
+ "encrypted": MediaEncryptedEvent;
+ "waitingforkey": Event;
+}
+
+/** Adds to HTMLElement the properties and methods needed to support basic media-related capabilities that are common to audio and video. */
+interface HTMLMediaElement extends HTMLElement {
+ /**
+ * Gets or sets a value that indicates whether to start playing the media automatically.
+ */
+ autoplay: boolean;
+ /**
+ * Gets a collection of buffered time ranges.
+ */
+ readonly buffered: TimeRanges;
+ /**
+ * Gets or sets a flag that indicates whether the client provides a set of controls for the media (in case the developer does not include controls for the player).
+ */
+ controls: boolean;
+ crossOrigin: string | null;
+ /**
+ * Gets the address or URL of the current media resource that is selected by IHTMLMediaElement.
+ */
+ readonly currentSrc: string;
+ /**
+ * Gets or sets the current playback position, in seconds.
+ */
+ currentTime: number;
+ defaultMuted: boolean;
+ /**
+ * Gets or sets the default playback rate when the user is not using fast forward or reverse for a video or audio resource.
+ */
+ defaultPlaybackRate: number;
+ /**
+ * Returns the duration in seconds of the current media resource. A NaN value is returned if duration is not available, or Infinity if the media resource is streaming.
+ */
+ readonly duration: number;
+ /**
+ * Gets information about whether the playback has ended or not.
+ */
+ readonly ended: boolean;
+ /**
+ * Returns an object representing the current error state of the audio or video element.
+ */
+ readonly error: MediaError | null;
+ /**
+ * Gets or sets a flag to specify whether playback should restart after it completes.
+ */
+ loop: boolean;
+ readonly mediaKeys: MediaKeys | null;
+ /**
+ * Gets or sets a flag that indicates whether the audio (either audio or the audio track on video media) is muted.
+ */
+ muted: boolean;
+ /**
+ * Gets the current network activity for the element.
+ */
+ readonly networkState: number;
+ onencrypted: ((this: HTMLMediaElement, ev: MediaEncryptedEvent) => any) | null;
+ onwaitingforkey: ((this: HTMLMediaElement, ev: Event) => any) | null;
+ /**
+ * Gets a flag that specifies whether playback is paused.
+ */
+ readonly paused: boolean;
+ /**
+ * Gets or sets the current rate of speed for the media resource to play. This speed is expressed as a multiple of the normal speed of the media resource.
+ */
+ playbackRate: number;
+ /**
+ * Gets TimeRanges for the current media resource that has been played.
+ */
+ readonly played: TimeRanges;
+ /**
+ * Gets or sets the current playback position, in seconds.
+ */
+ preload: string;
+ readonly readyState: number;
+ /**
+ * Returns a TimeRanges object that represents the ranges of the current media resource that can be seeked.
+ */
+ readonly seekable: TimeRanges;
+ /**
+ * Gets a flag that indicates whether the client is currently moving to a new playback position in the media resource.
+ */
+ readonly seeking: boolean;
+ /**
+ * The address or URL of the a media resource that is to be considered.
+ */
+ src: string;
+ srcObject: MediaProvider | null;
+ readonly textTracks: TextTrackList;
+ /**
+ * Gets or sets the volume level for audio portions of the media element.
+ */
+ volume: number;
+ addTextTrack(kind: TextTrackKind, label?: string, language?: string): TextTrack;
+ /**
+ * Returns a string that specifies whether the client can play a given media resource type.
+ */
+ canPlayType(type: string): CanPlayTypeResult;
+ fastSeek(time: number): void;
+ /**
+ * Resets the audio or video object and loads a new media resource.
+ */
+ load(): void;
+ /**
+ * Pauses the current playback and sets paused to TRUE. This can be used to test whether the media is playing or paused. You can also use the pause or play events to tell whether the media is playing or not.
+ */
+ pause(): void;
+ /**
+ * Loads and starts playback of a media resource.
+ */
+ play(): Promise<void>;
+ setMediaKeys(mediaKeys: MediaKeys | null): Promise<void>;
+ readonly HAVE_CURRENT_DATA: number;
+ readonly HAVE_ENOUGH_DATA: number;
+ readonly HAVE_FUTURE_DATA: number;
+ readonly HAVE_METADATA: number;
+ readonly HAVE_NOTHING: number;
+ readonly NETWORK_EMPTY: number;
+ readonly NETWORK_IDLE: number;
+ readonly NETWORK_LOADING: number;
+ readonly NETWORK_NO_SOURCE: number;
+ addEventListener<K extends keyof HTMLMediaElementEventMap>(type: K, listener: (this: HTMLMediaElement, ev: HTMLMediaElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLMediaElementEventMap>(type: K, listener: (this: HTMLMediaElement, ev: HTMLMediaElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLMediaElement: {
+ prototype: HTMLMediaElement;
+ new(): HTMLMediaElement;
+ readonly HAVE_CURRENT_DATA: number;
+ readonly HAVE_ENOUGH_DATA: number;
+ readonly HAVE_FUTURE_DATA: number;
+ readonly HAVE_METADATA: number;
+ readonly HAVE_NOTHING: number;
+ readonly NETWORK_EMPTY: number;
+ readonly NETWORK_IDLE: number;
+ readonly NETWORK_LOADING: number;
+ readonly NETWORK_NO_SOURCE: number;
+};
+
+interface HTMLMenuElement extends HTMLElement {
+ /** @deprecated */
+ compact: boolean;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLMenuElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLMenuElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLMenuElement: {
+ prototype: HTMLMenuElement;
+ new(): HTMLMenuElement;
+};
+
+/** Contains descriptive metadata about a document. It inherits all of the properties and methods described in the HTMLElement interface. */
+interface HTMLMetaElement extends HTMLElement {
+ /**
+ * Gets or sets meta-information to associate with httpEquiv or name.
+ */
+ content: string;
+ /**
+ * Gets or sets information used to bind the value of a content attribute of a meta element to an HTTP response header.
+ */
+ httpEquiv: string;
+ /**
+ * Sets or retrieves the value specified in the content attribute of the meta object.
+ */
+ name: string;
+ /**
+ * Sets or retrieves a scheme to be used in interpreting the value of a property specified for the object.
+ */
+ /** @deprecated */
+ scheme: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLMetaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLMetaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLMetaElement: {
+ prototype: HTMLMetaElement;
+ new(): HTMLMetaElement;
+};
+
+/** The HTML <meter> elements expose the HTMLMeterElement interface, which provides special properties and methods (beyond the HTMLElement object interface they also have available to them by inheritance) for manipulating the layout and presentation of <meter> elements. */
+interface HTMLMeterElement extends HTMLElement {
+ high: number;
+ readonly labels: NodeListOf<HTMLLabelElement>;
+ low: number;
+ max: number;
+ min: number;
+ optimum: number;
+ value: number;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLMeterElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLMeterElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLMeterElement: {
+ prototype: HTMLMeterElement;
+ new(): HTMLMeterElement;
+};
+
+/** Provides special properties (beyond the regular methods and properties available through the HTMLElement interface they also have available to them by inheritance) for manipulating modification elements, that is <del> and <ins>. */
+interface HTMLModElement extends HTMLElement {
+ /**
+ * Sets or retrieves reference information about the object.
+ */
+ cite: string;
+ /**
+ * Sets or retrieves the date and time of a modification to the object.
+ */
+ dateTime: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLModElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLModElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLModElement: {
+ prototype: HTMLModElement;
+ new(): HTMLModElement;
+};
+
+/** Provides special properties (beyond those defined on the regular HTMLElement interface it also has available to it by inheritance) for manipulating ordered list elements. */
+interface HTMLOListElement extends HTMLElement {
+ /** @deprecated */
+ compact: boolean;
+ reversed: boolean;
+ /**
+ * The starting number.
+ */
+ start: number;
+ type: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLOListElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLOListElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLOListElement: {
+ prototype: HTMLOListElement;
+ new(): HTMLOListElement;
+};
+
+/** Provides special properties and methods (beyond those on the HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of <object> element, representing external resources. */
+interface HTMLObjectElement extends HTMLElement {
+ /** @deprecated */
+ align: string;
+ /**
+ * Sets or retrieves a character string that can be used to implement your own archive functionality for the object.
+ */
+ /** @deprecated */
+ archive: string;
+ /** @deprecated */
+ border: string;
+ /**
+ * Sets or retrieves the URL of the file containing the compiled Java class.
+ */
+ /** @deprecated */
+ code: string;
+ /**
+ * Sets or retrieves the URL of the component.
+ */
+ /** @deprecated */
+ codeBase: string;
+ /**
+ * Sets or retrieves the Internet media type for the code associated with the object.
+ */
+ /** @deprecated */
+ codeType: string;
+ /**
+ * Retrieves the document object of the page or frame.
+ */
+ readonly contentDocument: Document | null;
+ readonly contentWindow: WindowProxy | null;
+ /**
+ * Sets or retrieves the URL that references the data of the object.
+ */
+ data: string;
+ /** @deprecated */
+ declare: boolean;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ readonly form: HTMLFormElement | null;
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ height: string;
+ /** @deprecated */
+ hspace: number;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ name: string;
+ /**
+ * Sets or retrieves a message to be displayed while an object is loading.
+ */
+ /** @deprecated */
+ standby: string;
+ /**
+ * Sets or retrieves the MIME type of the object.
+ */
+ type: string;
+ /**
+ * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map.
+ */
+ useMap: string;
+ /**
+ * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
+ */
+ readonly validationMessage: string;
+ /**
+ * Returns a ValidityState object that represents the validity states of an element.
+ */
+ readonly validity: ValidityState;
+ /** @deprecated */
+ vspace: number;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ width: string;
+ /**
+ * Returns whether an element will successfully validate based on forms validation rules and constraints.
+ */
+ readonly willValidate: boolean;
+ /**
+ * Returns whether a form will validate when it is submitted, without having to submit it.
+ */
+ checkValidity(): boolean;
+ getSVGDocument(): Document | null;
+ reportValidity(): boolean;
+ /**
+ * Sets a custom error message that is displayed when a form is submitted.
+ * @param error Sets a custom error message that is displayed when a form is submitted.
+ */
+ setCustomValidity(error: string): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLObjectElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLObjectElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLObjectElement: {
+ prototype: HTMLObjectElement;
+ new(): HTMLObjectElement;
+};
+
+/** Provides special properties and methods (beyond the regular HTMLElement object interface they also have available to them by inheritance) for manipulating the layout and presentation of <optgroup> elements. */
+interface HTMLOptGroupElement extends HTMLElement {
+ disabled: boolean;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ readonly form: HTMLFormElement | null;
+ /**
+ * Sets or retrieves a value that you can use to implement your own label functionality for the object.
+ */
+ label: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLOptGroupElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLOptGroupElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLOptGroupElement: {
+ prototype: HTMLOptGroupElement;
+ new(): HTMLOptGroupElement;
+};
+
+/** <option> elements and inherits all classes and methods of the HTMLElement interface. */
+interface HTMLOptionElement extends HTMLElement {
+ /**
+ * Sets or retrieves the status of an option.
+ */
+ defaultSelected: boolean;
+ disabled: boolean;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ readonly form: HTMLFormElement | null;
+ /**
+ * Sets or retrieves the ordinal position of an option in a list box.
+ */
+ readonly index: number;
+ /**
+ * Sets or retrieves a value that you can use to implement your own label functionality for the object.
+ */
+ label: string;
+ /**
+ * Sets or retrieves whether the option in the list box is the default item.
+ */
+ selected: boolean;
+ /**
+ * Sets or retrieves the text string specified by the option tag.
+ */
+ text: string;
+ /**
+ * Sets or retrieves the value which is returned to the server when the form control is submitted.
+ */
+ value: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLOptionElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLOptionElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLOptionElement: {
+ prototype: HTMLOptionElement;
+ new(): HTMLOptionElement;
+};
+
+/** HTMLOptionsCollection is an interface representing a collection of HTML option elements (in document order) and offers methods and properties for traversing the list as well as optionally altering its items. This type is returned solely by the "options" property of select. */
+interface HTMLOptionsCollection extends HTMLCollectionOf<HTMLOptionElement> {
+ /**
+ * Returns the number of elements in the collection.
+ *
+ * When set to a smaller number, truncates the number of option elements in the corresponding container.
+ *
+ * When set to a greater number, adds new blank option elements to that container.
+ */
+ length: number;
+ /**
+ * Returns the index of the first selected item, if any, or −1 if there is no selected item.
+ *
+ * Can be set, to change the selection.
+ */
+ selectedIndex: number;
+ /**
+ * Inserts element before the node given by before.
+ *
+ * The before argument can be a number, in which case element is inserted before the item with that number, or an element from the collection, in which case element is inserted before that element.
+ *
+ * If before is omitted, null, or a number out of range, then element will be added at the end of the list.
+ *
+ * This method will throw a "HierarchyRequestError" DOMException if element is an ancestor of the element into which it is to be inserted.
+ */
+ add(element: HTMLOptionElement | HTMLOptGroupElement, before?: HTMLElement | number | null): void;
+ /**
+ * Removes the item with index index from the collection.
+ */
+ remove(index: number): void;
+}
+
+declare var HTMLOptionsCollection: {
+ prototype: HTMLOptionsCollection;
+ new(): HTMLOptionsCollection;
+};
+
+interface HTMLOrSVGElement {
+ autofocus: boolean;
+ readonly dataset: DOMStringMap;
+ nonce?: string;
+ tabIndex: number;
+ blur(): void;
+ focus(options?: FocusOptions): void;
+}
+
+/** Provides properties and methods (beyond those inherited from HTMLElement) for manipulating the layout and presentation of <output> elements. */
+interface HTMLOutputElement extends HTMLElement {
+ defaultValue: string;
+ readonly form: HTMLFormElement | null;
+ readonly htmlFor: DOMTokenList;
+ readonly labels: NodeListOf<HTMLLabelElement>;
+ name: string;
+ readonly type: string;
+ readonly validationMessage: string;
+ readonly validity: ValidityState;
+ value: string;
+ readonly willValidate: boolean;
+ checkValidity(): boolean;
+ reportValidity(): boolean;
+ setCustomValidity(error: string): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLOutputElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLOutputElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLOutputElement: {
+ prototype: HTMLOutputElement;
+ new(): HTMLOutputElement;
+};
+
+/** Provides special properties (beyond those of the regular HTMLElement object interface it inherits) for manipulating <p> elements. */
+interface HTMLParagraphElement extends HTMLElement {
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ /** @deprecated */
+ align: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLParagraphElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLParagraphElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLParagraphElement: {
+ prototype: HTMLParagraphElement;
+ new(): HTMLParagraphElement;
+};
+
+/** Provides special properties (beyond those of the regular HTMLElement object interface it inherits) for manipulating <param> elements, representing a pair of a key and a value that acts as a parameter for an <object> element. */
+interface HTMLParamElement extends HTMLElement {
+ /**
+ * Sets or retrieves the name of an input parameter for an element.
+ */
+ name: string;
+ /**
+ * Sets or retrieves the content type of the resource designated by the value attribute.
+ */
+ /** @deprecated */
+ type: string;
+ /**
+ * Sets or retrieves the value of an input parameter for an element.
+ */
+ value: string;
+ /**
+ * Sets or retrieves the data type of the value attribute.
+ */
+ /** @deprecated */
+ valueType: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLParamElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLParamElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLParamElement: {
+ prototype: HTMLParamElement;
+ new(): HTMLParamElement;
+};
+
+/** A <picture> HTML element. It doesn't implement specific properties or methods. */
+interface HTMLPictureElement extends HTMLElement {
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLPictureElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLPictureElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLPictureElement: {
+ prototype: HTMLPictureElement;
+ new(): HTMLPictureElement;
+};
+
+/** Exposes specific properties and methods (beyond those of the HTMLElement interface it also has available to it by inheritance) for manipulating a block of preformatted text (<pre>). */
+interface HTMLPreElement extends HTMLElement {
+ /**
+ * Sets or gets a value that you can use to implement your own width functionality for the object.
+ */
+ /** @deprecated */
+ width: number;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLPreElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLPreElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLPreElement: {
+ prototype: HTMLPreElement;
+ new(): HTMLPreElement;
+};
+
+/** Provides special properties and methods (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of <progress> elements. */
+interface HTMLProgressElement extends HTMLElement {
+ readonly labels: NodeListOf<HTMLLabelElement>;
+ /**
+ * Defines the maximum, or "done" value for a progress element.
+ */
+ max: number;
+ /**
+ * Returns the quotient of value/max when the value attribute is set (determinate progress bar), or -1 when the value attribute is missing (indeterminate progress bar).
+ */
+ readonly position: number;
+ /**
+ * Sets or gets the current value of a progress element. The value must be a non-negative number between 0 and the max value.
+ */
+ value: number;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLProgressElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLProgressElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLProgressElement: {
+ prototype: HTMLProgressElement;
+ new(): HTMLProgressElement;
+};
+
+/** Provides special properties and methods (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating quoting elements, like <blockquote> and <q>, but not the <cite> element. */
+interface HTMLQuoteElement extends HTMLElement {
+ /**
+ * Sets or retrieves reference information about the object.
+ */
+ cite: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLQuoteElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLQuoteElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLQuoteElement: {
+ prototype: HTMLQuoteElement;
+ new(): HTMLQuoteElement;
+};
+
+/** HTML <script> elements expose the HTMLScriptElement interface, which provides special properties and methods for manipulating the behavior and execution of <script> elements (beyond the inherited HTMLElement interface). */
+interface HTMLScriptElement extends HTMLElement {
+ async: boolean;
+ /**
+ * Sets or retrieves the character set used to encode the object.
+ */
+ /** @deprecated */
+ charset: string;
+ crossOrigin: string | null;
+ /**
+ * Sets or retrieves the status of the script.
+ */
+ defer: boolean;
+ /**
+ * Sets or retrieves the event for which the script is written.
+ */
+ /** @deprecated */
+ event: string;
+ /**
+ * Sets or retrieves the object that is bound to the event script.
+ */
+ /** @deprecated */
+ htmlFor: string;
+ integrity: string;
+ noModule: boolean;
+ referrerPolicy: string;
+ /**
+ * Retrieves the URL to an external file that contains the source code or data.
+ */
+ src: string;
+ /**
+ * Retrieves or sets the text of the object as a string.
+ */
+ text: string;
+ /**
+ * Sets or retrieves the MIME type for the associated scripting engine.
+ */
+ type: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLScriptElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLScriptElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLScriptElement: {
+ prototype: HTMLScriptElement;
+ new(): HTMLScriptElement;
+};
+
+/** A <select> HTML Element. These elements also share all of the properties and methods of other HTML elements via the HTMLElement interface. */
+interface HTMLSelectElement extends HTMLElement {
+ autocomplete: string;
+ disabled: boolean;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ readonly form: HTMLFormElement | null;
+ readonly labels: NodeListOf<HTMLLabelElement>;
+ /**
+ * Sets or retrieves the number of objects in a collection.
+ */
+ length: number;
+ /**
+ * Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list.
+ */
+ multiple: boolean;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ name: string;
+ readonly options: HTMLOptionsCollection;
+ /**
+ * When present, marks an element that can't be submitted without a value.
+ */
+ required: boolean;
+ /**
+ * Sets or retrieves the index of the selected option in a select object.
+ */
+ selectedIndex: number;
+ readonly selectedOptions: HTMLCollectionOf<HTMLOptionElement>;
+ /**
+ * Sets or retrieves the number of rows in the list box.
+ */
+ size: number;
+ /**
+ * Retrieves the type of select control based on the value of the MULTIPLE attribute.
+ */
+ readonly type: string;
+ /**
+ * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
+ */
+ readonly validationMessage: string;
+ /**
+ * Returns a ValidityState object that represents the validity states of an element.
+ */
+ readonly validity: ValidityState;
+ /**
+ * Sets or retrieves the value which is returned to the server when the form control is submitted.
+ */
+ value: string;
+ /**
+ * Returns whether an element will successfully validate based on forms validation rules and constraints.
+ */
+ readonly willValidate: boolean;
+ /**
+ * Adds an element to the areas, controlRange, or options collection.
+ * @param element Variant of type Number that specifies the index position in the collection where the element is placed. If no value is given, the method places the element at the end of the collection.
+ * @param before Variant of type Object that specifies an element to insert before, or null to append the object to the collection.
+ */
+ add(element: HTMLOptionElement | HTMLOptGroupElement, before?: HTMLElement | number | null): void;
+ /**
+ * Returns whether a form will validate when it is submitted, without having to submit it.
+ */
+ checkValidity(): boolean;
+ /**
+ * Retrieves a select object or an object from an options collection.
+ * @param name Variant of type Number or String that specifies the object or collection to retrieve. If this parameter is an integer, it is the zero-based index of the object. If this parameter is a string, all objects with matching name or id properties are retrieved, and a collection is returned if more than one match is made.
+ * @param index Variant of type Number that specifies the zero-based index of the object to retrieve when a collection is returned.
+ */
+ item(index: number): Element | null;
+ /**
+ * Retrieves a select object or an object from an options collection.
+ * @param namedItem A String that specifies the name or id property of the object to retrieve. A collection is returned if more than one match is made.
+ */
+ namedItem(name: string): HTMLOptionElement | null;
+ /**
+ * Removes an element from the collection.
+ * @param index Number that specifies the zero-based index of the element to remove from the collection.
+ */
+ remove(): void;
+ remove(index: number): void;
+ reportValidity(): boolean;
+ /**
+ * Sets a custom error message that is displayed when a form is submitted.
+ * @param error Sets a custom error message that is displayed when a form is submitted.
+ */
+ setCustomValidity(error: string): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLSelectElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLSelectElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+ [name: number]: HTMLOptionElement | HTMLOptGroupElement;
+}
+
+declare var HTMLSelectElement: {
+ prototype: HTMLSelectElement;
+ new(): HTMLSelectElement;
+};
+
+interface HTMLSlotElement extends HTMLElement {
+ name: string;
+ assignedElements(options?: AssignedNodesOptions): Element[];
+ assignedNodes(options?: AssignedNodesOptions): Node[];
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLSlotElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLSlotElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLSlotElement: {
+ prototype: HTMLSlotElement;
+ new(): HTMLSlotElement;
+};
+
+/** Provides special properties (beyond the regular HTMLElement object interface it also has available to it by inheritance) for manipulating <source> elements. */
+interface HTMLSourceElement extends HTMLElement {
+ /**
+ * Gets or sets the intended media type of the media source.
+ */
+ media: string;
+ sizes: string;
+ /**
+ * The address or URL of the a media resource that is to be considered.
+ */
+ src: string;
+ srcset: string;
+ /**
+ * Gets or sets the MIME type of a media resource.
+ */
+ type: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLSourceElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLSourceElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLSourceElement: {
+ prototype: HTMLSourceElement;
+ new(): HTMLSourceElement;
+};
+
+/** A <span> element and derives from the HTMLElement interface, but without implementing any additional properties or methods. */
+interface HTMLSpanElement extends HTMLElement {
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLSpanElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLSpanElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLSpanElement: {
+ prototype: HTMLSpanElement;
+ new(): HTMLSpanElement;
+};
+
+/** A <style> element. It inherits properties and methods from its parent, HTMLElement, and from LinkStyle. */
+interface HTMLStyleElement extends HTMLElement, LinkStyle {
+ /**
+ * Sets or retrieves the media type.
+ */
+ media: string;
+ /**
+ * Retrieves the CSS language in which the style sheet is written.
+ */
+ /** @deprecated */
+ type: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLStyleElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLStyleElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLStyleElement: {
+ prototype: HTMLStyleElement;
+ new(): HTMLStyleElement;
+};
+
+/** Special properties (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating table caption elements. */
+interface HTMLTableCaptionElement extends HTMLElement {
+ /**
+ * Sets or retrieves the alignment of the caption or legend.
+ */
+ /** @deprecated */
+ align: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableCaptionElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableCaptionElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLTableCaptionElement: {
+ prototype: HTMLTableCaptionElement;
+ new(): HTMLTableCaptionElement;
+};
+
+/** Provides special properties and methods (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of table cells, either header or data cells, in an HTML document. */
+interface HTMLTableCellElement extends HTMLElement {
+ /**
+ * Sets or retrieves abbreviated text for the object.
+ */
+ abbr: string;
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ /** @deprecated */
+ align: string;
+ /**
+ * Sets or retrieves a comma-delimited list of conceptual categories associated with the object.
+ */
+ /** @deprecated */
+ axis: string;
+ /** @deprecated */
+ bgColor: string;
+ /**
+ * Retrieves the position of the object in the cells collection of a row.
+ */
+ readonly cellIndex: number;
+ /** @deprecated */
+ ch: string;
+ /** @deprecated */
+ chOff: string;
+ /**
+ * Sets or retrieves the number columns in the table that the object should span.
+ */
+ colSpan: number;
+ /**
+ * Sets or retrieves a list of header cells that provide information for the object.
+ */
+ headers: string;
+ /**
+ * Sets or retrieves the height of the object.
+ */
+ /** @deprecated */
+ height: string;
+ /**
+ * Sets or retrieves whether the browser automatically performs wordwrap.
+ */
+ /** @deprecated */
+ noWrap: boolean;
+ /**
+ * Sets or retrieves how many rows in a table the cell should span.
+ */
+ rowSpan: number;
+ /**
+ * Sets or retrieves the group of cells in a table to which the object's information applies.
+ */
+ scope: string;
+ /** @deprecated */
+ vAlign: string;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ /** @deprecated */
+ width: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableCellElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableCellElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLTableCellElement: {
+ prototype: HTMLTableCellElement;
+ new(): HTMLTableCellElement;
+};
+
+/** Provides special properties (beyond the HTMLElement interface it also has available to it inheritance) for manipulating single or grouped table column elements. */
+interface HTMLTableColElement extends HTMLElement {
+ /**
+ * Sets or retrieves the alignment of the object relative to the display or table.
+ */
+ /** @deprecated */
+ align: string;
+ /** @deprecated */
+ ch: string;
+ /** @deprecated */
+ chOff: string;
+ /**
+ * Sets or retrieves the number of columns in the group.
+ */
+ span: number;
+ /** @deprecated */
+ vAlign: string;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ /** @deprecated */
+ width: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableColElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableColElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLTableColElement: {
+ prototype: HTMLTableColElement;
+ new(): HTMLTableColElement;
+};
+
+interface HTMLTableDataCellElement extends HTMLTableCellElement {
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableDataCellElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableDataCellElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLTableDataCellElement: {
+ prototype: HTMLTableDataCellElement;
+ new(): HTMLTableDataCellElement;
+};
+
+/** Provides special properties and methods (beyond the regular HTMLElement object interface it also has available to it by inheritance) for manipulating the layout and presentation of tables in an HTML document. */
+interface HTMLTableElement extends HTMLElement {
+ /**
+ * Sets or retrieves a value that indicates the table alignment.
+ */
+ /** @deprecated */
+ align: string;
+ /** @deprecated */
+ bgColor: string;
+ /**
+ * Sets or retrieves the width of the border to draw around the object.
+ */
+ /** @deprecated */
+ border: string;
+ /**
+ * Retrieves the caption object of a table.
+ */
+ caption: HTMLTableCaptionElement | null;
+ /**
+ * Sets or retrieves the amount of space between the border of the cell and the content of the cell.
+ */
+ /** @deprecated */
+ cellPadding: string;
+ /**
+ * Sets or retrieves the amount of space between cells in a table.
+ */
+ /** @deprecated */
+ cellSpacing: string;
+ /**
+ * Sets or retrieves the way the border frame around the table is displayed.
+ */
+ /** @deprecated */
+ frame: string;
+ /**
+ * Sets or retrieves the number of horizontal rows contained in the object.
+ */
+ readonly rows: HTMLCollectionOf<HTMLTableRowElement>;
+ /**
+ * Sets or retrieves which dividing lines (inner borders) are displayed.
+ */
+ /** @deprecated */
+ rules: string;
+ /**
+ * Sets or retrieves a description and/or structure of the object.
+ */
+ /** @deprecated */
+ summary: string;
+ /**
+ * Retrieves a collection of all tBody objects in the table. Objects in this collection are in source order.
+ */
+ readonly tBodies: HTMLCollectionOf<HTMLTableSectionElement>;
+ /**
+ * Retrieves the tFoot object of the table.
+ */
+ tFoot: HTMLTableSectionElement | null;
+ /**
+ * Retrieves the tHead object of the table.
+ */
+ tHead: HTMLTableSectionElement | null;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ /** @deprecated */
+ width: string;
+ /**
+ * Creates an empty caption element in the table.
+ */
+ createCaption(): HTMLTableCaptionElement;
+ /**
+ * Creates an empty tBody element in the table.
+ */
+ createTBody(): HTMLTableSectionElement;
+ /**
+ * Creates an empty tFoot element in the table.
+ */
+ createTFoot(): HTMLTableSectionElement;
+ /**
+ * Returns the tHead element object if successful, or null otherwise.
+ */
+ createTHead(): HTMLTableSectionElement;
+ /**
+ * Deletes the caption element and its contents from the table.
+ */
+ deleteCaption(): void;
+ /**
+ * Removes the specified row (tr) from the element and from the rows collection.
+ * @param index Number that specifies the zero-based position in the rows collection of the row to remove.
+ */
+ deleteRow(index: number): void;
+ /**
+ * Deletes the tFoot element and its contents from the table.
+ */
+ deleteTFoot(): void;
+ /**
+ * Deletes the tHead element and its contents from the table.
+ */
+ deleteTHead(): void;
+ /**
+ * Creates a new row (tr) in the table, and adds the row to the rows collection.
+ * @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.
+ */
+ insertRow(index?: number): HTMLTableRowElement;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLTableElement: {
+ prototype: HTMLTableElement;
+ new(): HTMLTableElement;
+};
+
+interface HTMLTableHeaderCellElement extends HTMLTableCellElement {
+ scope: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableHeaderCellElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableHeaderCellElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLTableHeaderCellElement: {
+ prototype: HTMLTableHeaderCellElement;
+ new(): HTMLTableHeaderCellElement;
+};
+
+/** Provides special properties and methods (beyond the HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of rows in an HTML table. */
+interface HTMLTableRowElement extends HTMLElement {
+ /**
+ * Sets or retrieves how the object is aligned with adjacent text.
+ */
+ /** @deprecated */
+ align: string;
+ /** @deprecated */
+ bgColor: string;
+ /**
+ * Retrieves a collection of all cells in the table row.
+ */
+ readonly cells: HTMLCollectionOf<HTMLTableDataCellElement | HTMLTableHeaderCellElement>;
+ /** @deprecated */
+ ch: string;
+ /** @deprecated */
+ chOff: string;
+ /**
+ * Retrieves the position of the object in the rows collection for the table.
+ */
+ readonly rowIndex: number;
+ /**
+ * Retrieves the position of the object in the collection.
+ */
+ readonly sectionRowIndex: number;
+ /** @deprecated */
+ vAlign: string;
+ /**
+ * Removes the specified cell from the table row, as well as from the cells collection.
+ * @param index Number that specifies the zero-based position of the cell to remove from the table row. If no value is provided, the last cell in the cells collection is deleted.
+ */
+ deleteCell(index: number): void;
+ /**
+ * Creates a new cell in the table row, and adds the cell to the cells collection.
+ * @param index Number that specifies where to insert the cell in the tr. The default value is -1, which appends the new cell to the end of the cells collection.
+ */
+ insertCell(index?: number): HTMLTableDataCellElement;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableRowElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableRowElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLTableRowElement: {
+ prototype: HTMLTableRowElement;
+ new(): HTMLTableRowElement;
+};
+
+/** Provides special properties and methods (beyond the HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of sections, that is headers, footers and bodies, in an HTML table. */
+interface HTMLTableSectionElement extends HTMLElement {
+ /**
+ * Sets or retrieves a value that indicates the table alignment.
+ */
+ /** @deprecated */
+ align: string;
+ /** @deprecated */
+ ch: string;
+ /** @deprecated */
+ chOff: string;
+ /**
+ * Sets or retrieves the number of horizontal rows contained in the object.
+ */
+ readonly rows: HTMLCollectionOf<HTMLTableRowElement>;
+ /** @deprecated */
+ vAlign: string;
+ /**
+ * Removes the specified row (tr) from the element and from the rows collection.
+ * @param index Number that specifies the zero-based position in the rows collection of the row to remove.
+ */
+ deleteRow(index: number): void;
+ /**
+ * Creates a new row (tr) in the table, and adds the row to the rows collection.
+ * @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection.
+ */
+ insertRow(index?: number): HTMLTableRowElement;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableSectionElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTableSectionElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLTableSectionElement: {
+ prototype: HTMLTableSectionElement;
+ new(): HTMLTableSectionElement;
+};
+
+/** Enables access to the contents of an HTML <template> element. */
+interface HTMLTemplateElement extends HTMLElement {
+ readonly content: DocumentFragment;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTemplateElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTemplateElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLTemplateElement: {
+ prototype: HTMLTemplateElement;
+ new(): HTMLTemplateElement;
+};
+
+/** Provides special properties and methods for manipulating the layout and presentation of <textarea> elements. */
+interface HTMLTextAreaElement extends HTMLElement {
+ autocomplete: string;
+ /**
+ * Sets or retrieves the width of the object.
+ */
+ cols: number;
+ /**
+ * Sets or retrieves the initial contents of the object.
+ */
+ defaultValue: string;
+ dirName: string;
+ disabled: boolean;
+ /**
+ * Retrieves a reference to the form that the object is embedded in.
+ */
+ readonly form: HTMLFormElement | null;
+ readonly labels: NodeListOf<HTMLLabelElement>;
+ /**
+ * Sets or retrieves the maximum number of characters that the user can enter in a text control.
+ */
+ maxLength: number;
+ minLength: number;
+ /**
+ * Sets or retrieves the name of the object.
+ */
+ name: string;
+ /**
+ * Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field.
+ */
+ placeholder: string;
+ /**
+ * Sets or retrieves the value indicated whether the content of the object is read-only.
+ */
+ readOnly: boolean;
+ /**
+ * When present, marks an element that can't be submitted without a value.
+ */
+ required: boolean;
+ /**
+ * Sets or retrieves the number of horizontal rows contained in the object.
+ */
+ rows: number;
+ selectionDirection: "forward" | "backward" | "none";
+ /**
+ * Gets or sets the end position or offset of a text selection.
+ */
+ selectionEnd: number;
+ /**
+ * Gets or sets the starting position or offset of a text selection.
+ */
+ selectionStart: number;
+ readonly textLength: number;
+ /**
+ * Retrieves the type of control.
+ */
+ readonly type: string;
+ /**
+ * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
+ */
+ readonly validationMessage: string;
+ /**
+ * Returns a ValidityState object that represents the validity states of an element.
+ */
+ readonly validity: ValidityState;
+ /**
+ * Retrieves or sets the text in the entry field of the textArea element.
+ */
+ value: string;
+ /**
+ * Returns whether an element will successfully validate based on forms validation rules and constraints.
+ */
+ readonly willValidate: boolean;
+ /**
+ * Sets or retrieves how to handle wordwrapping in the object.
+ */
+ wrap: string;
+ /**
+ * Returns whether a form will validate when it is submitted, without having to submit it.
+ */
+ checkValidity(): boolean;
+ reportValidity(): boolean;
+ /**
+ * Highlights the input area of a form element.
+ */
+ select(): void;
+ /**
+ * Sets a custom error message that is displayed when a form is submitted.
+ * @param error Sets a custom error message that is displayed when a form is submitted.
+ */
+ setCustomValidity(error: string): void;
+ setRangeText(replacement: string): void;
+ setRangeText(replacement: string, start: number, end: number, selectionMode?: SelectionMode): void;
+ /**
+ * Sets the start and end positions of a selection in a text field.
+ * @param start The offset into the text field for the start of the selection.
+ * @param end The offset into the text field for the end of the selection.
+ * @param direction The direction in which the selection is performed.
+ */
+ setSelectionRange(start: number, end: number, direction?: "forward" | "backward" | "none"): void;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTextAreaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTextAreaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLTextAreaElement: {
+ prototype: HTMLTextAreaElement;
+ new(): HTMLTextAreaElement;
+};
+
+/** Provides special properties (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating <time> elements. */
+interface HTMLTimeElement extends HTMLElement {
+ dateTime: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTimeElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTimeElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLTimeElement: {
+ prototype: HTMLTimeElement;
+ new(): HTMLTimeElement;
+};
+
+/** Contains the title for a document. This element inherits all of the properties and methods of the HTMLElement interface. */
+interface HTMLTitleElement extends HTMLElement {
+ /**
+ * Retrieves or sets the text of the object as a string.
+ */
+ text: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTitleElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTitleElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLTitleElement: {
+ prototype: HTMLTitleElement;
+ new(): HTMLTitleElement;
+};
+
+/** The HTMLTrackElement */
+interface HTMLTrackElement extends HTMLElement {
+ default: boolean;
+ kind: string;
+ label: string;
+ readonly readyState: number;
+ src: string;
+ srclang: string;
+ readonly track: TextTrack;
+ readonly ERROR: number;
+ readonly LOADED: number;
+ readonly LOADING: number;
+ readonly NONE: number;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTrackElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLTrackElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLTrackElement: {
+ prototype: HTMLTrackElement;
+ new(): HTMLTrackElement;
+ readonly ERROR: number;
+ readonly LOADED: number;
+ readonly LOADING: number;
+ readonly NONE: number;
+};
+
+/** Provides special properties (beyond those defined on the regular HTMLElement interface it also has available to it by inheritance) for manipulating unordered list elements. */
+interface HTMLUListElement extends HTMLElement {
+ /** @deprecated */
+ compact: boolean;
+ /** @deprecated */
+ type: string;
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLUListElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLUListElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLUListElement: {
+ prototype: HTMLUListElement;
+ new(): HTMLUListElement;
+};
+
+/** An invalid HTML element and derives from the HTMLElement interface, but without implementing any additional properties or methods. */
+interface HTMLUnknownElement extends HTMLElement {
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLUnknownElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLUnknownElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLUnknownElement: {
+ prototype: HTMLUnknownElement;
+ new(): HTMLUnknownElement;
+};
+
+/** Provides special properties and methods for manipulating video objects. It also inherits properties and methods of HTMLMediaElement and HTMLElement. */
+interface HTMLVideoElement extends HTMLMediaElement {
+ /**
+ * Gets or sets the height of the video element.
+ */
+ height: number;
+ /**
+ * Gets or sets a URL of an image to display, for example, like a movie poster. This can be a still frame from the video, or another image if no video data is available.
+ */
+ poster: string;
+ /**
+ * Gets the intrinsic height of a video in CSS pixels, or zero if the dimensions are not known.
+ */
+ readonly videoHeight: number;
+ /**
+ * Gets the intrinsic width of a video in CSS pixels, or zero if the dimensions are not known.
+ */
+ readonly videoWidth: number;
+ /**
+ * Gets or sets the width of the video element.
+ */
+ width: number;
+ getVideoPlaybackQuality(): VideoPlaybackQuality;
+ addEventListener<K extends keyof HTMLMediaElementEventMap>(type: K, listener: (this: HTMLVideoElement, ev: HTMLMediaElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof HTMLMediaElementEventMap>(type: K, listener: (this: HTMLVideoElement, ev: HTMLMediaElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var HTMLVideoElement: {
+ prototype: HTMLVideoElement;
+ new(): HTMLVideoElement;
+};
+
+/** Events that fire when the fragment identifier of the URL has changed. */
+interface HashChangeEvent extends Event {
+ /**
+ * Returns the URL of the session history entry that is now current.
+ */
+ readonly newURL: string;
+ /**
+ * Returns the URL of the session history entry that was previously current.
+ */
+ readonly oldURL: string;
+}
+
+declare var HashChangeEvent: {
+ prototype: HashChangeEvent;
+ new(type: string, eventInitDict?: HashChangeEventInit): HashChangeEvent;
+};
+
+/** This Fetch API interface allows you to perform various actions on HTTP request and response headers. These actions include retrieving, setting, adding to, and removing. A Headers object has an associated header list, which is initially empty and consists of zero or more name and value pairs.  You can add to this using methods like append() (see Examples.) In all methods of this interface, header names are matched by case-insensitive byte sequence. */
+interface Headers {
+ append(name: string, value: string): void;
+ delete(name: string): void;
+ get(name: string): string | null;
+ has(name: string): boolean;
+ set(name: string, value: string): void;
+ forEach(callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any): void;
+}
+
+declare var Headers: {
+ prototype: Headers;
+ new(init?: HeadersInit): Headers;
+};
+
+/** Allows manipulation of the browser session history, that is the pages visited in the tab or frame that the current page is loaded in. */
+interface History {
+ readonly length: number;
+ scrollRestoration: ScrollRestoration;
+ readonly state: any;
+ back(): void;
+ forward(): void;
+ go(delta?: number): void;
+ pushState(data: any, title: string, url?: string | null): void;
+ replaceState(data: any, title: string, url?: string | null): void;
+}
+
+declare var History: {
+ prototype: History;
+ new(): History;
+};
+
+interface HkdfCtrParams extends Algorithm {
+ context: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer;
+ hash: string | Algorithm;
+ label: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer;
+}
+
+interface IDBArrayKey extends Array<IDBValidKey> {
+}
+
+/** This IndexedDB API interface represents a cursor for traversing or iterating over multiple records in a database. */
+interface IDBCursor {
+ /**
+ * Returns the direction ("next", "nextunique", "prev" or "prevunique") of the cursor.
+ */
+ readonly direction: IDBCursorDirection;
+ /**
+ * Returns the key of the cursor. Throws a "InvalidStateError" DOMException if the cursor is advancing or is finished.
+ */
+ readonly key: IDBValidKey;
+ /**
+ * Returns the effective key of the cursor. Throws a "InvalidStateError" DOMException if the cursor is advancing or is finished.
+ */
+ readonly primaryKey: IDBValidKey;
+ /**
+ * Returns the IDBObjectStore or IDBIndex the cursor was opened from.
+ */
+ readonly source: IDBObjectStore | IDBIndex;
+ /**
+ * Advances the cursor through the next count records in range.
+ */
+ advance(count: number): void;
+ /**
+ * Advances the cursor to the next record in range.
+ */
+ continue(key?: IDBValidKey): void;
+ /**
+ * Advances the cursor to the next record in range matching or after key and primaryKey. Throws an "InvalidAccessError" DOMException if the source is not an index.
+ */
+ continuePrimaryKey(key: IDBValidKey, primaryKey: IDBValidKey): void;
+ /**
+ * Delete the record pointed at by the cursor with a new value.
+ *
+ * If successful, request's result will be undefined.
+ */
+ delete(): IDBRequest<undefined>;
+ /**
+ * Updated the record pointed at by the cursor with a new value.
+ *
+ * Throws a "DataError" DOMException if the effective object store uses in-line keys and the key would have changed.
+ *
+ * If successful, request's result will be the record's key.
+ */
+ update(value: any): IDBRequest<IDBValidKey>;
+}
+
+declare var IDBCursor: {
+ prototype: IDBCursor;
+ new(): IDBCursor;
+};
+
+/** This IndexedDB API interface represents a cursor for traversing or iterating over multiple records in a database. It is the same as the IDBCursor, except that it includes the value property. */
+interface IDBCursorWithValue extends IDBCursor {
+ /**
+ * Returns the cursor's current value.
+ */
+ readonly value: any;
+}
+
+declare var IDBCursorWithValue: {
+ prototype: IDBCursorWithValue;
+ new(): IDBCursorWithValue;
+};
+
+interface IDBDatabaseEventMap {
+ "abort": Event;
+ "close": Event;
+ "error": Event;
+ "versionchange": IDBVersionChangeEvent;
+}
+
+/** This IndexedDB API interface provides a connection to a database; you can use an IDBDatabase object to open a transaction on your database then create, manipulate, and delete objects (data) in that database. The interface provides the only way to get and manage versions of the database. */
+interface IDBDatabase extends EventTarget {
+ /**
+ * Returns the name of the database.
+ */
+ readonly name: string;
+ /**
+ * Returns a list of the names of object stores in the database.
+ */
+ readonly objectStoreNames: DOMStringList;
+ onabort: ((this: IDBDatabase, ev: Event) => any) | null;
+ onclose: ((this: IDBDatabase, ev: Event) => any) | null;
+ onerror: ((this: IDBDatabase, ev: Event) => any) | null;
+ onversionchange: ((this: IDBDatabase, ev: IDBVersionChangeEvent) => any) | null;
+ /**
+ * Returns the version of the database.
+ */
+ readonly version: number;
+ /**
+ * Closes the connection once all running transactions have finished.
+ */
+ close(): void;
+ /**
+ * Creates a new object store with the given name and options and returns a new IDBObjectStore.
+ *
+ * Throws a "InvalidStateError" DOMException if not called within an upgrade transaction.
+ */
+ createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore;
+ /**
+ * Deletes the object store with the given name.
+ *
+ * Throws a "InvalidStateError" DOMException if not called within an upgrade transaction.
+ */
+ deleteObjectStore(name: string): void;
+ /**
+ * Returns a new transaction with the given mode ("readonly" or "readwrite") and scope which can be a single object store name or an array of names.
+ */
+ transaction(storeNames: string | string[], mode?: IDBTransactionMode): IDBTransaction;
+ addEventListener<K extends keyof IDBDatabaseEventMap>(type: K, listener: (this: IDBDatabase, ev: IDBDatabaseEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof IDBDatabaseEventMap>(type: K, listener: (this: IDBDatabase, ev: IDBDatabaseEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var IDBDatabase: {
+ prototype: IDBDatabase;
+ new(): IDBDatabase;
+};
+
+/** In the following code snippet, we make a request to open a database, and include handlers for the success and error cases. For a full working example, see our To-do Notifications app (view example live.) */
+interface IDBFactory {
+ /**
+ * Compares two values as keys. Returns -1 if key1 precedes key2, 1 if key2 precedes key1, and 0 if the keys are equal.
+ *
+ * Throws a "DataError" DOMException if either input is not a valid key.
+ */
+ cmp(first: any, second: any): number;
+ /**
+ * Attempts to delete the named database. If the database already exists and there are open connections that don't close in response to a versionchange event, the request will be blocked until all they close. If the request is successful request's result will be null.
+ */
+ deleteDatabase(name: string): IDBOpenDBRequest;
+ /**
+ * Attempts to open a connection to the named database with the current version, or 1 if it does not already exist. If the request is successful request's result will be the connection.
+ */
+ open(name: string, version?: number): IDBOpenDBRequest;
+}
+
+declare var IDBFactory: {
+ prototype: IDBFactory;
+ new(): IDBFactory;
+};
+
+/** IDBIndex interface of the IndexedDB API provides asynchronous access to an index in a database. An index is a kind of object store for looking up records in another object store, called the referenced object store. You use this interface to retrieve data. */
+interface IDBIndex {
+ readonly keyPath: string | string[];
+ readonly multiEntry: boolean;
+ /**
+ * Returns the name of the index.
+ */
+ name: string;
+ /**
+ * Returns the IDBObjectStore the index belongs to.
+ */
+ readonly objectStore: IDBObjectStore;
+ readonly unique: boolean;
+ /**
+ * Retrieves the number of records matching the given key or key range in query.
+ *
+ * If successful, request's result will be the count.
+ */
+ count(key?: IDBValidKey | IDBKeyRange): IDBRequest<number>;
+ /**
+ * Retrieves the value of the first record matching the given key or key range in query.
+ *
+ * If successful, request's result will be the value, or undefined if there was no matching record.
+ */
+ get(key: IDBValidKey | IDBKeyRange): IDBRequest<any | undefined>;
+ /**
+ * Retrieves the values of the records matching the given key or key range in query (up to count if given).
+ *
+ * If successful, request's result will be an Array of the values.
+ */
+ getAll(query?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest<any[]>;
+ /**
+ * Retrieves the keys of records matching the given key or key range in query (up to count if given).
+ *
+ * If successful, request's result will be an Array of the keys.
+ */
+ getAllKeys(query?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest<IDBValidKey[]>;
+ /**
+ * Retrieves the key of the first record matching the given key or key range in query.
+ *
+ * If successful, request's result will be the key, or undefined if there was no matching record.
+ */
+ getKey(key: IDBValidKey | IDBKeyRange): IDBRequest<IDBValidKey | undefined>;
+ /**
+ * Opens a cursor over the records matching query, ordered by direction. If query is null, all records in index are matched.
+ *
+ * If successful, request's result will be an IDBCursorWithValue, or null if there were no matching records.
+ */
+ openCursor(query?: IDBValidKey | IDBKeyRange | null, direction?: IDBCursorDirection): IDBRequest<IDBCursorWithValue | null>;
+ /**
+ * Opens a cursor with key only flag set over the records matching query, ordered by direction. If query is null, all records in index are matched.
+ *
+ * If successful, request's result will be an IDBCursor, or null if there were no matching records.
+ */
+ openKeyCursor(query?: IDBValidKey | IDBKeyRange | null, direction?: IDBCursorDirection): IDBRequest<IDBCursor | null>;
+}
+
+declare var IDBIndex: {
+ prototype: IDBIndex;
+ new(): IDBIndex;
+};
+
+/** A key range can be a single value or a range with upper and lower bounds or endpoints. If the key range has both upper and lower bounds, then it is bounded; if it has no bounds, it is unbounded. A bounded key range can either be open (the endpoints are excluded) or closed (the endpoints are included). To retrieve all keys within a certain range, you can use the following code constructs: */
+interface IDBKeyRange {
+ /**
+ * Returns lower bound, or undefined if none.
+ */
+ readonly lower: any;
+ /**
+ * Returns true if the lower open flag is set, and false otherwise.
+ */
+ readonly lowerOpen: boolean;
+ /**
+ * Returns upper bound, or undefined if none.
+ */
+ readonly upper: any;
+ /**
+ * Returns true if the upper open flag is set, and false otherwise.
+ */
+ readonly upperOpen: boolean;
+ /**
+ * Returns true if key is included in the range, and false otherwise.
+ */
+ includes(key: any): boolean;
+}
+
+declare var IDBKeyRange: {
+ prototype: IDBKeyRange;
+ new(): IDBKeyRange;
+ /**
+ * Returns a new IDBKeyRange spanning from lower to upper. If lowerOpen is true, lower is not included in the range. If upperOpen is true, upper is not included in the range.
+ */
+ bound(lower: any, upper: any, lowerOpen?: boolean, upperOpen?: boolean): IDBKeyRange;
+ /**
+ * Returns a new IDBKeyRange starting at key with no upper bound. If open is true, key is not included in the range.
+ */
+ lowerBound(lower: any, open?: boolean): IDBKeyRange;
+ /**
+ * Returns a new IDBKeyRange spanning only key.
+ */
+ only(value: any): IDBKeyRange;
+ /**
+ * Returns a new IDBKeyRange with no lower bound and ending at key. If open is true, key is not included in the range.
+ */
+ upperBound(upper: any, open?: boolean): IDBKeyRange;
+};
+
+/** This example shows a variety of different uses of object stores, from updating the data structure with IDBObjectStore.createIndex inside an onupgradeneeded function, to adding a new item to our object store with IDBObjectStore.add. For a full working example, see our To-do Notifications app (view example live.) */
+interface IDBObjectStore {
+ /**
+ * Returns true if the store has a key generator, and false otherwise.
+ */
+ readonly autoIncrement: boolean;
+ /**
+ * Returns a list of the names of indexes in the store.
+ */
+ readonly indexNames: DOMStringList;
+ /**
+ * Returns the key path of the store, or null if none.
+ */
+ readonly keyPath: string | string[];
+ /**
+ * Returns the name of the store.
+ */
+ name: string;
+ /**
+ * Returns the associated transaction.
+ */
+ readonly transaction: IDBTransaction;
+ /**
+ * Adds or updates a record in store with the given value and key.
+ *
+ * If the store uses in-line keys and key is specified a "DataError" DOMException will be thrown.
+ *
+ * If put() is used, any existing record with the key will be replaced. If add() is used, and if a record with the key already exists the request will fail, with request's error set to a "ConstraintError" DOMException.
+ *
+ * If successful, request's result will be the record's key.
+ */
+ add(value: any, key?: IDBValidKey): IDBRequest<IDBValidKey>;
+ /**
+ * Deletes all records in store.
+ *
+ * If successful, request's result will be undefined.
+ */
+ clear(): IDBRequest<undefined>;
+ /**
+ * Retrieves the number of records matching the given key or key range in query.
+ *
+ * If successful, request's result will be the count.
+ */
+ count(key?: IDBValidKey | IDBKeyRange): IDBRequest<number>;
+ /**
+ * Creates a new index in store with the given name, keyPath and options and returns a new IDBIndex. If the keyPath and options define constraints that cannot be satisfied with the data already in store the upgrade transaction will abort with a "ConstraintError" DOMException.
+ *
+ * Throws an "InvalidStateError" DOMException if not called within an upgrade transaction.
+ */
+ createIndex(name: string, keyPath: string | string[], options?: IDBIndexParameters): IDBIndex;
+ /**
+ * Deletes records in store with the given key or in the given key range in query.
+ *
+ * If successful, request's result will be undefined.
+ */
+ delete(key: IDBValidKey | IDBKeyRange): IDBRequest<undefined>;
+ /**
+ * Deletes the index in store with the given name.
+ *
+ * Throws an "InvalidStateError" DOMException if not called within an upgrade transaction.
+ */
+ deleteIndex(name: string): void;
+ /**
+ * Retrieves the value of the first record matching the given key or key range in query.
+ *
+ * If successful, request's result will be the value, or undefined if there was no matching record.
+ */
+ get(query: IDBValidKey | IDBKeyRange): IDBRequest<any | undefined>;
+ /**
+ * Retrieves the values of the records matching the given key or key range in query (up to count if given).
+ *
+ * If successful, request's result will be an Array of the values.
+ */
+ getAll(query?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest<any[]>;
+ /**
+ * Retrieves the keys of records matching the given key or key range in query (up to count if given).
+ *
+ * If successful, request's result will be an Array of the keys.
+ */
+ getAllKeys(query?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest<IDBValidKey[]>;
+ /**
+ * Retrieves the key of the first record matching the given key or key range in query.
+ *
+ * If successful, request's result will be the key, or undefined if there was no matching record.
+ */
+ getKey(query: IDBValidKey | IDBKeyRange): IDBRequest<IDBValidKey | undefined>;
+ index(name: string): IDBIndex;
+ /**
+ * Opens a cursor over the records matching query, ordered by direction. If query is null, all records in store are matched.
+ *
+ * If successful, request's result will be an IDBCursorWithValue pointing at the first matching record, or null if there were no matching records.
+ */
+ openCursor(query?: IDBValidKey | IDBKeyRange | null, direction?: IDBCursorDirection): IDBRequest<IDBCursorWithValue | null>;
+ /**
+ * Opens a cursor with key only flag set over the records matching query, ordered by direction. If query is null, all records in store are matched.
+ *
+ * If successful, request's result will be an IDBCursor pointing at the first matching record, or null if there were no matching records.
+ */
+ openKeyCursor(query?: IDBValidKey | IDBKeyRange | null, direction?: IDBCursorDirection): IDBRequest<IDBCursor | null>;
+ /**
+ * Adds or updates a record in store with the given value and key.
+ *
+ * If the store uses in-line keys and key is specified a "DataError" DOMException will be thrown.
+ *
+ * If put() is used, any existing record with the key will be replaced. If add() is used, and if a record with the key already exists the request will fail, with request's error set to a "ConstraintError" DOMException.
+ *
+ * If successful, request's result will be the record's key.
+ */
+ put(value: any, key?: IDBValidKey): IDBRequest<IDBValidKey>;
+}
+
+declare var IDBObjectStore: {
+ prototype: IDBObjectStore;
+ new(): IDBObjectStore;
+};
+
+interface IDBOpenDBRequestEventMap extends IDBRequestEventMap {
+ "blocked": Event;
+ "upgradeneeded": IDBVersionChangeEvent;
+}
+
+/** Also inherits methods from its parents IDBRequest and EventTarget. */
+interface IDBOpenDBRequest extends IDBRequest<IDBDatabase> {
+ onblocked: ((this: IDBOpenDBRequest, ev: Event) => any) | null;
+ onupgradeneeded: ((this: IDBOpenDBRequest, ev: IDBVersionChangeEvent) => any) | null;
+ addEventListener<K extends keyof IDBOpenDBRequestEventMap>(type: K, listener: (this: IDBOpenDBRequest, ev: IDBOpenDBRequestEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof IDBOpenDBRequestEventMap>(type: K, listener: (this: IDBOpenDBRequest, ev: IDBOpenDBRequestEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var IDBOpenDBRequest: {
+ prototype: IDBOpenDBRequest;
+ new(): IDBOpenDBRequest;
+};
+
+interface IDBRequestEventMap {
+ "error": Event;
+ "success": Event;
+}
+
+/** The request object does not initially contain any information about the result of the operation, but once information becomes available, an event is fired on the request, and the information becomes available through the properties of the IDBRequest instance. */
+interface IDBRequest<T = any> extends EventTarget {
+ /**
+ * When a request is completed, returns the error (a DOMException), or null if the request succeeded. Throws a "InvalidStateError" DOMException if the request is still pending.
+ */
+ readonly error: DOMException | null;
+ onerror: ((this: IDBRequest<T>, ev: Event) => any) | null;
+ onsuccess: ((this: IDBRequest<T>, ev: Event) => any) | null;
+ /**
+ * Returns "pending" until a request is complete, then returns "done".
+ */
+ readonly readyState: IDBRequestReadyState;
+ /**
+ * When a request is completed, returns the result, or undefined if the request failed. Throws a "InvalidStateError" DOMException if the request is still pending.
+ */
+ readonly result: T;
+ /**
+ * Returns the IDBObjectStore, IDBIndex, or IDBCursor the request was made against, or null if is was an open request.
+ */
+ readonly source: IDBObjectStore | IDBIndex | IDBCursor;
+ /**
+ * Returns the IDBTransaction the request was made within. If this as an open request, then it returns an upgrade transaction while it is running, or null otherwise.
+ */
+ readonly transaction: IDBTransaction | null;
+ addEventListener<K extends keyof IDBRequestEventMap>(type: K, listener: (this: IDBRequest<T>, ev: IDBRequestEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof IDBRequestEventMap>(type: K, listener: (this: IDBRequest<T>, ev: IDBRequestEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var IDBRequest: {
+ prototype: IDBRequest;
+ new(): IDBRequest;
+};
+
+interface IDBTransactionEventMap {
+ "abort": Event;
+ "complete": Event;
+ "error": Event;
+}
+
+interface IDBTransaction extends EventTarget {
+ /**
+ * Returns the transaction's connection.
+ */
+ readonly db: IDBDatabase;
+ /**
+ * If the transaction was aborted, returns the error (a DOMException) providing the reason.
+ */
+ readonly error: DOMException;
+ /**
+ * Returns the mode the transaction was created with ("readonly" or "readwrite"), or "versionchange" for an upgrade transaction.
+ */
+ readonly mode: IDBTransactionMode;
+ /**
+ * Returns a list of the names of object stores in the transaction's scope. For an upgrade transaction this is all object stores in the database.
+ */
+ readonly objectStoreNames: DOMStringList;
+ onabort: ((this: IDBTransaction, ev: Event) => any) | null;
+ oncomplete: ((this: IDBTransaction, ev: Event) => any) | null;
+ onerror: ((this: IDBTransaction, ev: Event) => any) | null;
+ /**
+ * Aborts the transaction. All pending requests will fail with a "AbortError" DOMException and all changes made to the database will be reverted.
+ */
+ abort(): void;
+ /**
+ * Returns an IDBObjectStore in the transaction's scope.
+ */
+ objectStore(name: string): IDBObjectStore;
+ addEventListener<K extends keyof IDBTransactionEventMap>(type: K, listener: (this: IDBTransaction, ev: IDBTransactionEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof IDBTransactionEventMap>(type: K, listener: (this: IDBTransaction, ev: IDBTransactionEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var IDBTransaction: {
+ prototype: IDBTransaction;
+ new(): IDBTransaction;
+};
+
+/** This IndexedDB API interface indicates that the version of the database has changed, as the result of an IDBOpenDBRequest.onupgradeneeded event handler function. */
+interface IDBVersionChangeEvent extends Event {
+ readonly newVersion: number | null;
+ readonly oldVersion: number;
+}
+
+declare var IDBVersionChangeEvent: {
+ prototype: IDBVersionChangeEvent;
+ new(type: string, eventInitDict?: IDBVersionChangeEventInit): IDBVersionChangeEvent;
+};
+
+/** The IIRFilterNode interface of the Web Audio API is a AudioNode processor which implements a general infinite impulse response (IIR)  filter; this type of filter can be used to implement tone control devices and graphic equalizers as well. It lets the parameters of the filter response be specified, so that it can be tuned as needed. */
+interface IIRFilterNode extends AudioNode {
+ getFrequencyResponse(frequencyHz: Float32Array, magResponse: Float32Array, phaseResponse: Float32Array): void;
+}
+
+declare var IIRFilterNode: {
+ prototype: IIRFilterNode;
+ new(context: BaseAudioContext, options: IIRFilterOptions): IIRFilterNode;
+};
+
+interface ImageBitmap {
+ /**
+ * Returns the intrinsic height of the image, in CSS pixels.
+ */
+ readonly height: number;
+ /**
+ * Returns the intrinsic width of the image, in CSS pixels.
+ */
+ readonly width: number;
+ /**
+ * Releases imageBitmap's underlying bitmap data.
+ */
+ close(): void;
+}
+
+declare var ImageBitmap: {
+ prototype: ImageBitmap;
+ new(): ImageBitmap;
+};
+
+interface ImageBitmapRenderingContext {
+ /**
+ * Returns the canvas element that the context is bound to.
+ */
+ readonly canvas: HTMLCanvasElement | OffscreenCanvas;
+ /**
+ * Transfers the underlying bitmap data from imageBitmap to context, and the bitmap becomes the contents of the canvas element to which context is bound.
+ */
+ transferFromImageBitmap(bitmap: ImageBitmap | null): void;
+}
+
+declare var ImageBitmapRenderingContext: {
+ prototype: ImageBitmapRenderingContext;
+ new(): ImageBitmapRenderingContext;
+};
+
+/** The underlying pixel data of an area of a <canvas> element. It is created using the ImageData() constructor or creator methods on the CanvasRenderingContext2D object associated with a canvas: createImageData() and getImageData(). It can also be used to set a part of the canvas by using putImageData(). */
+interface ImageData {
+ /**
+ * Returns the one-dimensional array containing the data in RGBA order, as integers in the range 0 to 255.
+ */
+ readonly data: Uint8ClampedArray;
+ /**
+ * Returns the actual dimensions of the data in the ImageData object, in pixels.
+ */
+ readonly height: number;
+ /**
+ * Returns the actual dimensions of the data in the ImageData object, in pixels.
+ */
+ readonly width: number;
+}
+
+declare var ImageData: {
+ prototype: ImageData;
+ new(width: number, height: number): ImageData;
+ new(array: Uint8ClampedArray, width: number, height?: number): ImageData;
+};
+
+interface InnerHTML {
+ innerHTML: string;
+}
+
+interface InputDeviceInfo extends MediaDeviceInfo {
+ getCapabilities(): MediaTrackCapabilities;
+}
+
+declare var InputDeviceInfo: {
+ prototype: InputDeviceInfo;
+ new(): InputDeviceInfo;
+};
+
+interface InputEvent extends UIEvent {
+ readonly data: string | null;
+ readonly inputType: string;
+ readonly isComposing: boolean;
+}
+
+declare var InputEvent: {
+ prototype: InputEvent;
+ new(type: string, eventInitDict?: InputEventInit): InputEvent;
+};
+
+/** provides a way to asynchronously observe changes in the intersection of a target element with an ancestor element or with a top-level document's viewport. */
+interface IntersectionObserver {
+ readonly root: Element | null;
+ readonly rootMargin: string;
+ readonly thresholds: ReadonlyArray<number>;
+ disconnect(): void;
+ observe(target: Element): void;
+ takeRecords(): IntersectionObserverEntry[];
+ unobserve(target: Element): void;
+}
+
+declare var IntersectionObserver: {
+ prototype: IntersectionObserver;
+ new(callback: IntersectionObserverCallback, options?: IntersectionObserverInit): IntersectionObserver;
+};
+
+/** This Intersection Observer API interface describes the intersection between the target element and its root container at a specific moment of transition. */
+interface IntersectionObserverEntry {
+ readonly boundingClientRect: DOMRectReadOnly;
+ readonly intersectionRatio: number;
+ readonly intersectionRect: DOMRectReadOnly;
+ readonly isIntersecting: boolean;
+ readonly rootBounds: DOMRectReadOnly | null;
+ readonly target: Element;
+ readonly time: number;
+}
+
+declare var IntersectionObserverEntry: {
+ prototype: IntersectionObserverEntry;
+ new(intersectionObserverEntryInit: IntersectionObserverEntryInit): IntersectionObserverEntry;
+};
+
+/** KeyboardEvent objects describe a user interaction with the keyboard; each event describes a single interaction between the user and a key (or combination of a key with modifier keys) on the keyboard. */
+interface KeyboardEvent extends UIEvent {
+ readonly altKey: boolean;
+ /** @deprecated */
+ char: string;
+ /** @deprecated */
+ readonly charCode: number;
+ readonly code: string;
+ readonly ctrlKey: boolean;
+ readonly isComposing: boolean;
+ readonly key: string;
+ /** @deprecated */
+ readonly keyCode: number;
+ readonly location: number;
+ readonly metaKey: boolean;
+ readonly repeat: boolean;
+ readonly shiftKey: boolean;
+ getModifierState(keyArg: string): boolean;
+ readonly DOM_KEY_LOCATION_LEFT: number;
+ readonly DOM_KEY_LOCATION_NUMPAD: number;
+ readonly DOM_KEY_LOCATION_RIGHT: number;
+ readonly DOM_KEY_LOCATION_STANDARD: number;
+}
+
+declare var KeyboardEvent: {
+ prototype: KeyboardEvent;
+ new(type: string, eventInitDict?: KeyboardEventInit): KeyboardEvent;
+ readonly DOM_KEY_LOCATION_LEFT: number;
+ readonly DOM_KEY_LOCATION_NUMPAD: number;
+ readonly DOM_KEY_LOCATION_RIGHT: number;
+ readonly DOM_KEY_LOCATION_STANDARD: number;
+};
+
+interface KeyframeEffect extends AnimationEffect {
+ composite: CompositeOperation;
+ iterationComposite: IterationCompositeOperation;
+ target: Element | null;
+ getKeyframes(): ComputedKeyframe[];
+ setKeyframes(keyframes: Keyframe[] | PropertyIndexedKeyframes | null): void;
+}
+
+declare var KeyframeEffect: {
+ prototype: KeyframeEffect;
+ new(target: Element | null, keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeEffectOptions): KeyframeEffect;
+ new(source: KeyframeEffect): KeyframeEffect;
+};
+
+interface LinkStyle {
+ readonly sheet: CSSStyleSheet | null;
+}
+
+interface ListeningStateChangedEvent extends Event {
+ readonly label: string;
+ readonly state: ListeningState;
+}
+
+declare var ListeningStateChangedEvent: {
+ prototype: ListeningStateChangedEvent;
+ new(): ListeningStateChangedEvent;
+};
+
+/** The location (URL) of the object it is linked to. Changes done on it are reflected on the object it relates to. Both the Document and Window interface have such a linked Location, accessible via Document.location and Window.location respectively. */
+interface Location {
+ /**
+ * Returns a DOMStringList object listing the origins of the ancestor browsing contexts, from the parent browsing context to the top-level browsing context.
+ */
+ readonly ancestorOrigins: DOMStringList;
+ /**
+ * Returns the Location object's URL's fragment (includes leading "#" if non-empty).
+ *
+ * Can be set, to navigate to the same URL with a changed fragment (ignores leading "#").
+ */
+ hash: string;
+ /**
+ * Returns the Location object's URL's host and port (if different from the default port for the scheme).
+ *
+ * Can be set, to navigate to the same URL with a changed host and port.
+ */
+ host: string;
+ /**
+ * Returns the Location object's URL's host.
+ *
+ * Can be set, to navigate to the same URL with a changed host.
+ */
+ hostname: string;
+ /**
+ * Returns the Location object's URL.
+ *
+ * Can be set, to navigate to the given URL.
+ */
+ href: string;
+ toString(): string;
+ /**
+ * Returns the Location object's URL's origin.
+ */
+ readonly origin: string;
+ /**
+ * Returns the Location object's URL's path.
+ *
+ * Can be set, to navigate to the same URL with a changed path.
+ */
+ pathname: string;
+ /**
+ * Returns the Location object's URL's port.
+ *
+ * Can be set, to navigate to the same URL with a changed port.
+ */
+ port: string;
+ /**
+ * Returns the Location object's URL's scheme.
+ *
+ * Can be set, to navigate to the same URL with a changed scheme.
+ */
+ protocol: string;
+ /**
+ * Returns the Location object's URL's query (includes leading "?" if non-empty).
+ *
+ * Can be set, to navigate to the same URL with a changed query (ignores leading "?").
+ */
+ search: string;
+ /**
+ * Navigates to the given URL.
+ */
+ assign(url: string): void;
+ /**
+ * Reloads the current page.
+ */
+ reload(): void;
+ /** @deprecated */
+ reload(forcedReload: boolean): void;
+ /**
+ * Removes the current page from the session history and navigates to the given URL.
+ */
+ replace(url: string): void;
+}
+
+declare var Location: {
+ prototype: Location;
+ new(): Location;
+};
+
+interface MSAssertion {
+ readonly id: string;
+ readonly type: MSCredentialType;
+}
+
+declare var MSAssertion: {
+ prototype: MSAssertion;
+ new(): MSAssertion;
+};
+
+interface MSBlobBuilder {
+ append(data: any, endings?: string): void;
+ getBlob(contentType?: string): Blob;
+}
+
+declare var MSBlobBuilder: {
+ prototype: MSBlobBuilder;
+ new(): MSBlobBuilder;
+};
+
+interface MSFIDOCredentialAssertion extends MSAssertion {
+ readonly algorithm: string | Algorithm;
+ readonly attestation: any;
+ readonly publicKey: string;
+ readonly transportHints: MSTransportType[];
+}
+
+declare var MSFIDOCredentialAssertion: {
+ prototype: MSFIDOCredentialAssertion;
+ new(): MSFIDOCredentialAssertion;
+};
+
+interface MSFIDOSignature {
+ readonly authnrData: string;
+ readonly clientData: string;
+ readonly signature: string;
+}
+
+declare var MSFIDOSignature: {
+ prototype: MSFIDOSignature;
+ new(): MSFIDOSignature;
+};
+
+interface MSFIDOSignatureAssertion extends MSAssertion {
+ readonly signature: MSFIDOSignature;
+}
+
+declare var MSFIDOSignatureAssertion: {
+ prototype: MSFIDOSignatureAssertion;
+ new(): MSFIDOSignatureAssertion;
+};
+
+interface MSFileSaver {
+ msSaveBlob(blob: any, defaultName?: string): boolean;
+ msSaveOrOpenBlob(blob: any, defaultName?: string): boolean;
+}
+
+interface MSGesture {
+ target: Element;
+ addPointer(pointerId: number): void;
+ stop(): void;
+}
+
+declare var MSGesture: {
+ prototype: MSGesture;
+ new(): MSGesture;
+};
+
+/** The MSGestureEvent is a proprietary interface specific to Internet Explorer and Microsoft Edge which represents events that occur due to touch gestures. Events using this interface include MSGestureStart, MSGestureEnd, MSGestureTap, MSGestureHold, MSGestureChange, and MSInertiaStart. */
+interface MSGestureEvent extends UIEvent {
+ readonly clientX: number;
+ readonly clientY: number;
+ readonly expansion: number;
+ readonly gestureObject: any;
+ readonly hwTimestamp: number;
+ readonly offsetX: number;
+ readonly offsetY: number;
+ readonly rotation: number;
+ readonly scale: number;
+ readonly screenX: number;
+ readonly screenY: number;
+ readonly translationX: number;
+ readonly translationY: number;
+ readonly velocityAngular: number;
+ readonly velocityExpansion: number;
+ readonly velocityX: number;
+ readonly velocityY: number;
+ initGestureEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, offsetXArg: number, offsetYArg: number, translationXArg: number, translationYArg: number, scaleArg: number, expansionArg: number, rotationArg: number, velocityXArg: number, velocityYArg: number, velocityExpansionArg: number, velocityAngularArg: number, hwTimestampArg: number): void;
+ readonly MSGESTURE_FLAG_BEGIN: number;
+ readonly MSGESTURE_FLAG_CANCEL: number;
+ readonly MSGESTURE_FLAG_END: number;
+ readonly MSGESTURE_FLAG_INERTIA: number;
+ readonly MSGESTURE_FLAG_NONE: number;
+}
+
+declare var MSGestureEvent: {
+ prototype: MSGestureEvent;
+ new(): MSGestureEvent;
+ readonly MSGESTURE_FLAG_BEGIN: number;
+ readonly MSGESTURE_FLAG_CANCEL: number;
+ readonly MSGESTURE_FLAG_END: number;
+ readonly MSGESTURE_FLAG_INERTIA: number;
+ readonly MSGESTURE_FLAG_NONE: number;
+};
+
+/** The msGraphicsTrust() constructor returns an object that provides properties for info on protected video playback. */
+interface MSGraphicsTrust {
+ readonly constrictionActive: boolean;
+ readonly status: string;
+}
+
+declare var MSGraphicsTrust: {
+ prototype: MSGraphicsTrust;
+ new(): MSGraphicsTrust;
+};
+
+interface MSInputMethodContextEventMap {
+ "MSCandidateWindowHide": Event;
+ "MSCandidateWindowShow": Event;
+ "MSCandidateWindowUpdate": Event;
+}
+
+interface MSInputMethodContext extends EventTarget {
+ readonly compositionEndOffset: number;
+ readonly compositionStartOffset: number;
+ oncandidatewindowhide: ((this: MSInputMethodContext, ev: Event) => any) | null;
+ oncandidatewindowshow: ((this: MSInputMethodContext, ev: Event) => any) | null;
+ oncandidatewindowupdate: ((this: MSInputMethodContext, ev: Event) => any) | null;
+ readonly target: HTMLElement;
+ getCandidateWindowClientRect(): ClientRect;
+ getCompositionAlternatives(): string[];
+ hasComposition(): boolean;
+ isCandidateWindowVisible(): boolean;
+ addEventListener<K extends keyof MSInputMethodContextEventMap>(type: K, listener: (this: MSInputMethodContext, ev: MSInputMethodContextEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof MSInputMethodContextEventMap>(type: K, listener: (this: MSInputMethodContext, ev: MSInputMethodContextEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var MSInputMethodContext: {
+ prototype: MSInputMethodContext;
+ new(): MSInputMethodContext;
+};
+
+interface MSMediaKeyError {
+ readonly code: number;
+ readonly systemCode: number;
+ readonly MS_MEDIA_KEYERR_CLIENT: number;
+ readonly MS_MEDIA_KEYERR_DOMAIN: number;
+ readonly MS_MEDIA_KEYERR_HARDWARECHANGE: number;
+ readonly MS_MEDIA_KEYERR_OUTPUT: number;
+ readonly MS_MEDIA_KEYERR_SERVICE: number;
+ readonly MS_MEDIA_KEYERR_UNKNOWN: number;
+}
+
+declare var MSMediaKeyError: {
+ prototype: MSMediaKeyError;
+ new(): MSMediaKeyError;
+ readonly MS_MEDIA_KEYERR_CLIENT: number;
+ readonly MS_MEDIA_KEYERR_DOMAIN: number;
+ readonly MS_MEDIA_KEYERR_HARDWARECHANGE: number;
+ readonly MS_MEDIA_KEYERR_OUTPUT: number;
+ readonly MS_MEDIA_KEYERR_SERVICE: number;
+ readonly MS_MEDIA_KEYERR_UNKNOWN: number;
+};
+
+interface MSMediaKeyMessageEvent extends Event {
+ readonly destinationURL: string | null;
+ readonly message: Uint8Array;
+}
+
+declare var MSMediaKeyMessageEvent: {
+ prototype: MSMediaKeyMessageEvent;
+ new(): MSMediaKeyMessageEvent;
+};
+
+interface MSMediaKeyNeededEvent extends Event {
+ readonly initData: Uint8Array | null;
+}
+
+declare var MSMediaKeyNeededEvent: {
+ prototype: MSMediaKeyNeededEvent;
+ new(): MSMediaKeyNeededEvent;
+};
+
+interface MSMediaKeySession extends EventTarget {
+ readonly error: MSMediaKeyError | null;
+ readonly keySystem: string;
+ readonly sessionId: string;
+ close(): void;
+ update(key: Uint8Array): void;
+}
+
+declare var MSMediaKeySession: {
+ prototype: MSMediaKeySession;
+ new(): MSMediaKeySession;
+};
+
+interface MSMediaKeys {
+ readonly keySystem: string;
+ createSession(type: string, initData: Uint8Array, cdmData?: Uint8Array | null): MSMediaKeySession;
+}
+
+declare var MSMediaKeys: {
+ prototype: MSMediaKeys;
+ new(keySystem: string): MSMediaKeys;
+ isTypeSupported(keySystem: string, type?: string | null): boolean;
+ isTypeSupportedWithFeatures(keySystem: string, type?: string | null): string;
+};
+
+interface MSNavigatorDoNotTrack {
+ confirmSiteSpecificTrackingException(args: ConfirmSiteSpecificExceptionsInformation): boolean;
+ confirmWebWideTrackingException(args: ExceptionInformation): boolean;
+ removeSiteSpecificTrackingException(args: ExceptionInformation): void;
+ removeWebWideTrackingException(args: ExceptionInformation): void;
+ storeSiteSpecificTrackingException(args: StoreSiteSpecificExceptionsInformation): void;
+ storeWebWideTrackingException(args: StoreExceptionsInformation): void;
+}
+
+interface MSPointerEvent extends MouseEvent {
+ readonly currentPoint: any;
+ readonly height: number;
+ readonly hwTimestamp: number;
+ readonly intermediatePoints: any;
+ readonly isPrimary: boolean;
+ readonly pointerId: number;
+ readonly pointerType: any;
+ readonly pressure: number;
+ readonly rotation: number;
+ readonly tiltX: number;
+ readonly tiltY: number;
+ readonly width: number;
+ getCurrentPoint(element: Element): void;
+ getIntermediatePoints(element: Element): void;
+ initPointerEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, offsetXArg: number, offsetYArg: number, widthArg: number, heightArg: number, pressure: number, rotation: number, tiltX: number, tiltY: number, pointerIdArg: number, pointerType: any, hwTimestampArg: number, isPrimary: boolean): void;
+}
+
+declare var MSPointerEvent: {
+ prototype: MSPointerEvent;
+ new(typeArg: string, eventInitDict?: PointerEventInit): MSPointerEvent;
+};
+
+interface MSStream {
+ readonly type: string;
+ msClose(): void;
+ msDetachStream(): any;
+}
+
+declare var MSStream: {
+ prototype: MSStream;
+ new(): MSStream;
+};
+
+/** The MediaDevicesInfo interface contains information that describes a single media input or output device. */
+interface MediaDeviceInfo {
+ readonly deviceId: string;
+ readonly groupId: string;
+ readonly kind: MediaDeviceKind;
+ readonly label: string;
+ toJSON(): any;
+}
+
+declare var MediaDeviceInfo: {
+ prototype: MediaDeviceInfo;
+ new(): MediaDeviceInfo;
+};
+
+interface MediaDevicesEventMap {
+ "devicechange": Event;
+}
+
+/** Provides access to connected media input devices like cameras and microphones, as well as screen sharing. In essence, it lets you obtain access to any hardware source of media data. */
+interface MediaDevices extends EventTarget {
+ ondevicechange: ((this: MediaDevices, ev: Event) => any) | null;
+ enumerateDevices(): Promise<MediaDeviceInfo[]>;
+ getSupportedConstraints(): MediaTrackSupportedConstraints;
+ getUserMedia(constraints?: MediaStreamConstraints): Promise<MediaStream>;
+ addEventListener<K extends keyof MediaDevicesEventMap>(type: K, listener: (this: MediaDevices, ev: MediaDevicesEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof MediaDevicesEventMap>(type: K, listener: (this: MediaDevices, ev: MediaDevicesEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var MediaDevices: {
+ prototype: MediaDevices;
+ new(): MediaDevices;
+};
+
+/** A MediaElementSourceNode has no inputs and exactly one output, and is created using the AudioContext.createMediaElementSource method. The amount of channels in the output equals the number of channels of the audio referenced by the HTMLMediaElement used in the creation of the node, or is 1 if the HTMLMediaElement has no audio. */
+interface MediaElementAudioSourceNode extends AudioNode {
+ readonly mediaElement: HTMLMediaElement;
+}
+
+declare var MediaElementAudioSourceNode: {
+ prototype: MediaElementAudioSourceNode;
+ new(context: AudioContext, options: MediaElementAudioSourceOptions): MediaElementAudioSourceNode;
+};
+
+interface MediaEncryptedEvent extends Event {
+ readonly initData: ArrayBuffer | null;
+ readonly initDataType: string;
+}
+
+declare var MediaEncryptedEvent: {
+ prototype: MediaEncryptedEvent;
+ new(type: string, eventInitDict?: MediaEncryptedEventInit): MediaEncryptedEvent;
+};
+
+/** An error which occurred while handling media in an HTML media element based on HTMLMediaElement, such as <audio> or <video>. */
+interface MediaError {
+ readonly code: number;
+ readonly message: string;
+ readonly MEDIA_ERR_ABORTED: number;
+ readonly MEDIA_ERR_DECODE: number;
+ readonly MEDIA_ERR_NETWORK: number;
+ readonly MEDIA_ERR_SRC_NOT_SUPPORTED: number;
+}
+
+declare var MediaError: {
+ prototype: MediaError;
+ new(): MediaError;
+ readonly MEDIA_ERR_ABORTED: number;
+ readonly MEDIA_ERR_DECODE: number;
+ readonly MEDIA_ERR_NETWORK: number;
+ readonly MEDIA_ERR_SRC_NOT_SUPPORTED: number;
+};
+
+/** This EncryptedMediaExtensions API interface contains the content and related data when the content decryption module generates a message for the session. */
+interface MediaKeyMessageEvent extends Event {
+ readonly message: ArrayBuffer;
+ readonly messageType: MediaKeyMessageType;
+}
+
+declare var MediaKeyMessageEvent: {
+ prototype: MediaKeyMessageEvent;
+ new(type: string, eventInitDict: MediaKeyMessageEventInit): MediaKeyMessageEvent;
+};
+
+interface MediaKeySessionEventMap {
+ "keystatuseschange": Event;
+ "message": MediaKeyMessageEvent;
+}
+
+/** This EncryptedMediaExtensions API interface represents a context for message exchange with a content decryption module (CDM). */
+interface MediaKeySession extends EventTarget {
+ readonly closed: Promise<void>;
+ readonly expiration: number;
+ readonly keyStatuses: MediaKeyStatusMap;
+ onkeystatuseschange: ((this: MediaKeySession, ev: Event) => any) | null;
+ onmessage: ((this: MediaKeySession, ev: MediaKeyMessageEvent) => any) | null;
+ readonly sessionId: string;
+ close(): Promise<void>;
+ generateRequest(initDataType: string, initData: BufferSource): Promise<void>;
+ load(sessionId: string): Promise<boolean>;
+ remove(): Promise<void>;
+ update(response: BufferSource): Promise<void>;
+ addEventListener<K extends keyof MediaKeySessionEventMap>(type: K, listener: (this: MediaKeySession, ev: MediaKeySessionEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof MediaKeySessionEventMap>(type: K, listener: (this: MediaKeySession, ev: MediaKeySessionEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var MediaKeySession: {
+ prototype: MediaKeySession;
+ new(): MediaKeySession;
+};
+
+/** This EncryptedMediaExtensions API interface is a read-only map of media key statuses by key IDs. */
+interface MediaKeyStatusMap {
+ readonly size: number;
+ get(keyId: BufferSource): MediaKeyStatus | undefined;
+ has(keyId: BufferSource): boolean;
+ forEach(callbackfn: (value: MediaKeyStatus, key: BufferSource, parent: MediaKeyStatusMap) => void, thisArg?: any): void;
+}
+
+declare var MediaKeyStatusMap: {
+ prototype: MediaKeyStatusMap;
+ new(): MediaKeyStatusMap;
+};
+
+/** This EncryptedMediaExtensions API interface provides access to a Key System for decryption and/or a content protection provider. You can request an instance of this object using the Navigator.requestMediaKeySystemAccess method. */
+interface MediaKeySystemAccess {
+ readonly keySystem: string;
+ createMediaKeys(): Promise<MediaKeys>;
+ getConfiguration(): MediaKeySystemConfiguration;
+}
+
+declare var MediaKeySystemAccess: {
+ prototype: MediaKeySystemAccess;
+ new(): MediaKeySystemAccess;
+};
+
+/** This EncryptedMediaExtensions API interface the represents a set of keys that an associated HTMLMediaElement can use for decryption of media data during playback. */
+interface MediaKeys {
+ createSession(sessionType?: MediaKeySessionType): MediaKeySession;
+ setServerCertificate(serverCertificate: BufferSource): Promise<boolean>;
+}
+
+declare var MediaKeys: {
+ prototype: MediaKeys;
+ new(): MediaKeys;
+};
+
+interface MediaList {
+ readonly length: number;
+ mediaText: string;
+ toString(): string;
+ appendMedium(medium: string): void;
+ deleteMedium(medium: string): void;
+ item(index: number): string | null;
+ [index: number]: string;
+}
+
+declare var MediaList: {
+ prototype: MediaList;
+ new(): MediaList;
+};
+
+interface MediaQueryListEventMap {
+ "change": MediaQueryListEvent;
+}
+
+/** Stores information on a media query applied to a document, and handles sending notifications to listeners when the media query state change (i.e. when the media query test starts or stops evaluating to true). */
+interface MediaQueryList extends EventTarget {
+ readonly matches: boolean;
+ readonly media: string;
+ onchange: ((this: MediaQueryList, ev: MediaQueryListEvent) => any) | null;
+ /** @deprecated */
+ addListener(listener: ((this: MediaQueryList, ev: MediaQueryListEvent) => any) | null): void;
+ /** @deprecated */
+ removeListener(listener: ((this: MediaQueryList, ev: MediaQueryListEvent) => any) | null): void;
+ addEventListener<K extends keyof MediaQueryListEventMap>(type: K, listener: (this: MediaQueryList, ev: MediaQueryListEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof MediaQueryListEventMap>(type: K, listener: (this: MediaQueryList, ev: MediaQueryListEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var MediaQueryList: {
+ prototype: MediaQueryList;
+ new(): MediaQueryList;
+};
+
+interface MediaQueryListEvent extends Event {
+ readonly matches: boolean;
+ readonly media: string;
+}
+
+declare var MediaQueryListEvent: {
+ prototype: MediaQueryListEvent;
+ new(type: string, eventInitDict?: MediaQueryListEventInit): MediaQueryListEvent;
+};
+
+interface MediaSourceEventMap {
+ "sourceclose": Event;
+ "sourceended": Event;
+ "sourceopen": Event;
+}
+
+/** This Media Source Extensions API interface represents a source of media data for an HTMLMediaElement object. A MediaSource object can be attached to a HTMLMediaElement to be played in the user agent. */
+interface MediaSource extends EventTarget {
+ readonly activeSourceBuffers: SourceBufferList;
+ duration: number;
+ onsourceclose: ((this: MediaSource, ev: Event) => any) | null;
+ onsourceended: ((this: MediaSource, ev: Event) => any) | null;
+ onsourceopen: ((this: MediaSource, ev: Event) => any) | null;
+ readonly readyState: ReadyState;
+ readonly sourceBuffers: SourceBufferList;
+ addSourceBuffer(type: string): SourceBuffer;
+ clearLiveSeekableRange(): void;
+ endOfStream(error?: EndOfStreamError): void;
+ removeSourceBuffer(sourceBuffer: SourceBuffer): void;
+ setLiveSeekableRange(start: number, end: number): void;
+ addEventListener<K extends keyof MediaSourceEventMap>(type: K, listener: (this: MediaSource, ev: MediaSourceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof MediaSourceEventMap>(type: K, listener: (this: MediaSource, ev: MediaSourceEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var MediaSource: {
+ prototype: MediaSource;
+ new(): MediaSource;
+ isTypeSupported(type: string): boolean;
+};
+
+interface MediaStreamEventMap {
+ "addtrack": MediaStreamTrackEvent;
+ "removetrack": MediaStreamTrackEvent;
+}
+
+/** A stream of media content. A stream consists of several tracks such as video or audio tracks. Each track is specified as an instance of MediaStreamTrack. */
+interface MediaStream extends EventTarget {
+ readonly active: boolean;
+ readonly id: string;
+ onaddtrack: ((this: MediaStream, ev: MediaStreamTrackEvent) => any) | null;
+ onremovetrack: ((this: MediaStream, ev: MediaStreamTrackEvent) => any) | null;
+ addTrack(track: MediaStreamTrack): void;
+ clone(): MediaStream;
+ getAudioTracks(): MediaStreamTrack[];
+ getTrackById(trackId: string): MediaStreamTrack | null;
+ getTracks(): MediaStreamTrack[];
+ getVideoTracks(): MediaStreamTrack[];
+ removeTrack(track: MediaStreamTrack): void;
+ addEventListener<K extends keyof MediaStreamEventMap>(type: K, listener: (this: MediaStream, ev: MediaStreamEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof MediaStreamEventMap>(type: K, listener: (this: MediaStream, ev: MediaStreamEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var MediaStream: {
+ prototype: MediaStream;
+ new(): MediaStream;
+ new(stream: MediaStream): MediaStream;
+ new(tracks: MediaStreamTrack[]): MediaStream;
+};
+
+interface MediaStreamAudioDestinationNode extends AudioNode {
+ readonly stream: MediaStream;
+}
+
+declare var MediaStreamAudioDestinationNode: {
+ prototype: MediaStreamAudioDestinationNode;
+ new(context: AudioContext, options?: AudioNodeOptions): MediaStreamAudioDestinationNode;
+};
+
+/** A type of AudioNode which operates as an audio source whose media is received from a MediaStream obtained using the WebRTC or Media Capture and Streams APIs. */
+interface MediaStreamAudioSourceNode extends AudioNode {
+ readonly mediaStream: MediaStream;
+}
+
+declare var MediaStreamAudioSourceNode: {
+ prototype: MediaStreamAudioSourceNode;
+ new(context: AudioContext, options: MediaStreamAudioSourceOptions): MediaStreamAudioSourceNode;
+};
+
+interface MediaStreamError {
+ readonly constraintName: string | null;
+ readonly message: string | null;
+ readonly name: string;
+}
+
+declare var MediaStreamError: {
+ prototype: MediaStreamError;
+ new(): MediaStreamError;
+};
+
+interface MediaStreamErrorEvent extends Event {
+ readonly error: MediaStreamError | null;
+}
+
+declare var MediaStreamErrorEvent: {
+ prototype: MediaStreamErrorEvent;
+ new(typeArg: string, eventInitDict?: MediaStreamErrorEventInit): MediaStreamErrorEvent;
+};
+
+/** Events that occurs in relation to a MediaStream. Two events of this type can be thrown: addstream and removestream. */
+interface MediaStreamEvent extends Event {
+ readonly stream: MediaStream | null;
+}
+
+declare var MediaStreamEvent: {
+ prototype: MediaStreamEvent;
+ new(type: string, eventInitDict: MediaStreamEventInit): MediaStreamEvent;
+};
+
+interface MediaStreamTrackEventMap {
+ "ended": Event;
+ "isolationchange": Event;
+ "mute": Event;
+ "unmute": Event;
+}
+
+/** A single media track within a stream; typically, these are audio or video tracks, but other track types may exist as well. */
+interface MediaStreamTrack extends EventTarget {
+ enabled: boolean;
+ readonly id: string;
+ readonly isolated: boolean;
+ readonly kind: string;
+ readonly label: string;
+ readonly muted: boolean;
+ onended: ((this: MediaStreamTrack, ev: Event) => any) | null;
+ onisolationchange: ((this: MediaStreamTrack, ev: Event) => any) | null;
+ onmute: ((this: MediaStreamTrack, ev: Event) => any) | null;
+ onunmute: ((this: MediaStreamTrack, ev: Event) => any) | null;
+ readonly readyState: MediaStreamTrackState;
+ applyConstraints(constraints?: MediaTrackConstraints): Promise<void>;
+ clone(): MediaStreamTrack;
+ getCapabilities(): MediaTrackCapabilities;
+ getConstraints(): MediaTrackConstraints;
+ getSettings(): MediaTrackSettings;
+ stop(): void;
+ addEventListener<K extends keyof MediaStreamTrackEventMap>(type: K, listener: (this: MediaStreamTrack, ev: MediaStreamTrackEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof MediaStreamTrackEventMap>(type: K, listener: (this: MediaStreamTrack, ev: MediaStreamTrackEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var MediaStreamTrack: {
+ prototype: MediaStreamTrack;
+ new(): MediaStreamTrack;
+};
+
+interface MediaStreamTrackAudioSourceNode extends AudioNode {
+}
+
+declare var MediaStreamTrackAudioSourceNode: {
+ prototype: MediaStreamTrackAudioSourceNode;
+ new(context: AudioContext, options: MediaStreamTrackAudioSourceOptions): MediaStreamTrackAudioSourceNode;
+};
+
+/** Events which indicate that a MediaStream has had tracks added to or removed from the stream through calls to Media Stream API methods. These events are sent to the stream when these changes occur. */
+interface MediaStreamTrackEvent extends Event {
+ readonly track: MediaStreamTrack;
+}
+
+declare var MediaStreamTrackEvent: {
+ prototype: MediaStreamTrackEvent;
+ new(type: string, eventInitDict: MediaStreamTrackEventInit): MediaStreamTrackEvent;
+};
+
+/** This Channel Messaging API interface allows us to create a new message channel and send data through it via its two MessagePort properties. */
+interface MessageChannel {
+ /**
+ * Returns the first MessagePort object.
+ */
+ readonly port1: MessagePort;
+ /**
+ * Returns the second MessagePort object.
+ */
+ readonly port2: MessagePort;
+}
+
+declare var MessageChannel: {
+ prototype: MessageChannel;
+ new(): MessageChannel;
+};
+
+/** A message received by a target object. */
+interface MessageEvent extends Event {
+ /**
+ * Returns the data of the message.
+ */
+ readonly data: any;
+ /**
+ * Returns the last event ID string, for server-sent events.
+ */
+ readonly lastEventId: string;
+ /**
+ * Returns the origin of the message, for server-sent events and cross-document messaging.
+ */
+ readonly origin: string;
+ /**
+ * Returns the MessagePort array sent with the message, for cross-document messaging and channel messaging.
+ */
+ readonly ports: ReadonlyArray<MessagePort>;
+ /**
+ * Returns the WindowProxy of the source window, for cross-document messaging, and the MessagePort being attached, in the connect event fired at SharedWorkerGlobalScope objects.
+ */
+ readonly source: MessageEventSource | null;
+}
+
+declare var MessageEvent: {
+ prototype: MessageEvent;
+ new(type: string, eventInitDict?: MessageEventInit): MessageEvent;
+};
+
+interface MessagePortEventMap {
+ "message": MessageEvent;
+ "messageerror": MessageEvent;
+}
+
+/** This Channel Messaging API interface represents one of the two ports of a MessageChannel, allowing messages to be sent from one port and listening out for them arriving at the other. */
+interface MessagePort extends EventTarget {
+ onmessage: ((this: MessagePort, ev: MessageEvent) => any) | null;
+ onmessageerror: ((this: MessagePort, ev: MessageEvent) => any) | null;
+ /**
+ * Disconnects the port, so that it is no longer active.
+ */
+ close(): void;
+ /**
+ * Posts a message through the channel. Objects listed in transfer are transferred, not just cloned, meaning that they are no longer usable on the sending side.
+ *
+ * Throws a "DataCloneError" DOMException if transfer contains duplicate objects or port, or if message could not be cloned.
+ */
+ postMessage(message: any, transfer: Transferable[]): void;
+ postMessage(message: any, options?: PostMessageOptions): void;
+ /**
+ * Begins dispatching messages received on the port.
+ */
+ start(): void;
+ addEventListener<K extends keyof MessagePortEventMap>(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof MessagePortEventMap>(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var MessagePort: {
+ prototype: MessagePort;
+ new(): MessagePort;
+};
+
+/** Provides contains information about a MIME type associated with a particular plugin. NavigatorPlugins.mimeTypes returns an array of this object. */
+interface MimeType {
+ /**
+ * Returns the MIME type's description.
+ */
+ readonly description: string;
+ /**
+ * Returns the Plugin object that implements this MIME type.
+ */
+ readonly enabledPlugin: Plugin;
+ /**
+ * Returns the MIME type's typical file extensions, in a comma-separated list.
+ */
+ readonly suffixes: string;
+ /**
+ * Returns the MIME type.
+ */
+ readonly type: string;
+}
+
+declare var MimeType: {
+ prototype: MimeType;
+ new(): MimeType;
+};
+
+/** Returns an array of MimeType instances, each of which contains information about a supported browser plugins. This object is returned by NavigatorPlugins.mimeTypes. */
+interface MimeTypeArray {
+ readonly length: number;
+ item(index: number): MimeType | null;
+ namedItem(name: string): MimeType | null;
+ [index: number]: MimeType;
+}
+
+declare var MimeTypeArray: {
+ prototype: MimeTypeArray;
+ new(): MimeTypeArray;
+};
+
+/** Events that occur due to the user interacting with a pointing device (such as a mouse). Common events using this interface include click, dblclick, mouseup, mousedown. */
+interface MouseEvent extends UIEvent {
+ readonly altKey: boolean;
+ readonly button: number;
+ readonly buttons: number;
+ readonly clientX: number;
+ readonly clientY: number;
+ readonly ctrlKey: boolean;
+ readonly metaKey: boolean;
+ readonly movementX: number;
+ readonly movementY: number;
+ readonly offsetX: number;
+ readonly offsetY: number;
+ readonly pageX: number;
+ readonly pageY: number;
+ readonly relatedTarget: EventTarget | null;
+ readonly screenX: number;
+ readonly screenY: number;
+ readonly shiftKey: boolean;
+ readonly x: number;
+ readonly y: number;
+ getModifierState(keyArg: string): boolean;
+ initMouseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget | null): void;
+}
+
+declare var MouseEvent: {
+ prototype: MouseEvent;
+ new(type: string, eventInitDict?: MouseEventInit): MouseEvent;
+};
+
+/** Provides event properties that are specific to modifications to the Document Object Model (DOM) hierarchy and nodes. */
+interface MutationEvent extends Event {
+ readonly attrChange: number;
+ readonly attrName: string;
+ readonly newValue: string;
+ readonly prevValue: string;
+ readonly relatedNode: Node;
+ initMutationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, relatedNodeArg: Node, prevValueArg: string, newValueArg: string, attrNameArg: string, attrChangeArg: number): void;
+ readonly ADDITION: number;
+ readonly MODIFICATION: number;
+ readonly REMOVAL: number;
+}
+
+declare var MutationEvent: {
+ prototype: MutationEvent;
+ new(): MutationEvent;
+ readonly ADDITION: number;
+ readonly MODIFICATION: number;
+ readonly REMOVAL: number;
+};
+
+/** Provides the ability to watch for changes being made to the DOM tree. It is designed as a replacement for the older Mutation Events feature which was part of the DOM3 Events specification. */
+interface MutationObserver {
+ /**
+ * Stops observer from observing any mutations. Until the observe() method is used again, observer's callback will not be invoked.
+ */
+ disconnect(): void;
+ /**
+ * Instructs the user agent to observe a given target (a node) and report any mutations based on the criteria given by options (an object).
+ *
+ * The options argument allows for setting mutation observation options via object members.
+ */
+ observe(target: Node, options?: MutationObserverInit): void;
+ /**
+ * Empties the record queue and returns what was in there.
+ */
+ takeRecords(): MutationRecord[];
+}
+
+declare var MutationObserver: {
+ prototype: MutationObserver;
+ new(callback: MutationCallback): MutationObserver;
+};
+
+/** A MutationRecord represents an individual DOM mutation. It is the object that is passed to MutationObserver's callback. */
+interface MutationRecord {
+ /**
+ * Return the nodes added and removed respectively.
+ */
+ readonly addedNodes: NodeList;
+ /**
+ * Returns the local name of the changed attribute, and null otherwise.
+ */
+ readonly attributeName: string | null;
+ /**
+ * Returns the namespace of the changed attribute, and null otherwise.
+ */
+ readonly attributeNamespace: string | null;
+ /**
+ * Return the previous and next sibling respectively of the added or removed nodes, and null otherwise.
+ */
+ readonly nextSibling: Node | null;
+ /**
+ * The return value depends on type. For "attributes", it is the value of the changed attribute before the change. For "characterData", it is the data of the changed node before the change. For "childList", it is null.
+ */
+ readonly oldValue: string | null;
+ /**
+ * Return the previous and next sibling respectively of the added or removed nodes, and null otherwise.
+ */
+ readonly previousSibling: Node | null;
+ /**
+ * Return the nodes added and removed respectively.
+ */
+ readonly removedNodes: NodeList;
+ /**
+ * Returns the node the mutation affected, depending on the type. For "attributes", it is the element whose attribute changed. For "characterData", it is the CharacterData node. For "childList", it is the node whose children changed.
+ */
+ readonly target: Node;
+ /**
+ * Returns "attributes" if it was an attribute mutation. "characterData" if it was a mutation to a CharacterData node. And "childList" if it was a mutation to the tree of nodes.
+ */
+ readonly type: MutationRecordType;
+}
+
+declare var MutationRecord: {
+ prototype: MutationRecord;
+ new(): MutationRecord;
+};
+
+/** A collection of Attr objects. Objects inside a NamedNodeMap are not in any particular order, unlike NodeList, although they may be accessed by an index as in an array. */
+interface NamedNodeMap {
+ readonly length: number;
+ getNamedItem(qualifiedName: string): Attr | null;
+ getNamedItemNS(namespace: string | null, localName: string): Attr | null;
+ item(index: number): Attr | null;
+ removeNamedItem(qualifiedName: string): Attr;
+ removeNamedItemNS(namespace: string | null, localName: string): Attr;
+ setNamedItem(attr: Attr): Attr | null;
+ setNamedItemNS(attr: Attr): Attr | null;
+ [index: number]: Attr;
+}
+
+declare var NamedNodeMap: {
+ prototype: NamedNodeMap;
+ new(): NamedNodeMap;
+};
+
+interface NavigationPreloadManager {
+ disable(): Promise<void>;
+ enable(): Promise<void>;
+ getState(): Promise<NavigationPreloadState>;
+ setHeaderValue(value: string): Promise<void>;
+}
+
+declare var NavigationPreloadManager: {
+ prototype: NavigationPreloadManager;
+ new(): NavigationPreloadManager;
+};
+
+/** The state and the identity of the user agent. It allows scripts to query it and to register themselves to carry on some activities. */
+interface Navigator extends MSFileSaver, MSNavigatorDoNotTrack, NavigatorAutomationInformation, NavigatorBeacon, NavigatorConcurrentHardware, NavigatorContentUtils, NavigatorCookies, NavigatorID, NavigatorLanguage, NavigatorOnLine, NavigatorPlugins, NavigatorStorage {
+ readonly activeVRDisplays: ReadonlyArray<VRDisplay>;
+ readonly clipboard: Clipboard;
+ readonly credentials: CredentialsContainer;
+ readonly doNotTrack: string | null;
+ readonly geolocation: Geolocation;
+ readonly maxTouchPoints: number;
+ readonly mediaDevices: MediaDevices;
+ readonly msManipulationViewsEnabled: boolean;
+ readonly msMaxTouchPoints: number;
+ readonly msPointerEnabled: boolean;
+ readonly permissions: Permissions;
+ readonly pointerEnabled: boolean;
+ readonly serviceWorker: ServiceWorkerContainer;
+ getGamepads(): (Gamepad | null)[];
+ getUserMedia(constraints: MediaStreamConstraints, successCallback: NavigatorUserMediaSuccessCallback, errorCallback: NavigatorUserMediaErrorCallback): void;
+ getVRDisplays(): Promise<VRDisplay[]>;
+ msLaunchUri(uri: string, successCallback?: MSLaunchUriCallback, noHandlerCallback?: MSLaunchUriCallback): void;
+ requestMediaKeySystemAccess(keySystem: string, supportedConfigurations: MediaKeySystemConfiguration[]): Promise<MediaKeySystemAccess>;
+ sendBeacon(url: string, data?: BodyInit | null): boolean;
+ share(data?: ShareData): Promise<void>;
+ vibrate(pattern: number | number[]): boolean;
+}
+
+declare var Navigator: {
+ prototype: Navigator;
+ new(): Navigator;
+};
+
+interface NavigatorAutomationInformation {
+ readonly webdriver: boolean;
+}
+
+interface NavigatorBeacon {
+ sendBeacon(url: string, data?: Blob | Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer | FormData | string | null): boolean;
+}
+
+interface NavigatorConcurrentHardware {
+ readonly hardwareConcurrency: number;
+}
+
+interface NavigatorContentUtils {
+ registerProtocolHandler(scheme: string, url: string, title: string): void;
+ unregisterProtocolHandler(scheme: string, url: string): void;
+}
+
+interface NavigatorCookies {
+ readonly cookieEnabled: boolean;
+}
+
+interface NavigatorID {
+ readonly appCodeName: string;
+ readonly appName: string;
+ readonly appVersion: string;
+ readonly platform: string;
+ readonly product: string;
+ readonly productSub: string;
+ readonly userAgent: string;
+ readonly vendor: string;
+ readonly vendorSub: string;
+}
+
+interface NavigatorLanguage {
+ readonly language: string;
+ readonly languages: ReadonlyArray<string>;
+}
+
+interface NavigatorOnLine {
+ readonly onLine: boolean;
+}
+
+interface NavigatorPlugins {
+ readonly mimeTypes: MimeTypeArray;
+ readonly plugins: PluginArray;
+ javaEnabled(): boolean;
+}
+
+interface NavigatorStorage {
+ readonly storage: StorageManager;
+}
+
+/** Node is an interface from which a number of DOM API object types inherit. It allows those types to be treated similarly; for example, inheriting the same set of methods, or being tested in the same way. */
+interface Node extends EventTarget {
+ /**
+ * Returns node's node document's document base URL.
+ */
+ readonly baseURI: string;
+ /**
+ * Returns the children.
+ */
+ readonly childNodes: NodeListOf<ChildNode>;
+ /**
+ * Returns the first child.
+ */
+ readonly firstChild: ChildNode | null;
+ /**
+ * Returns true if node is connected and false otherwise.
+ */
+ readonly isConnected: boolean;
+ /**
+ * Returns the last child.
+ */
+ readonly lastChild: ChildNode | null;
+ /** @deprecated */
+ readonly namespaceURI: string | null;
+ /**
+ * Returns the next sibling.
+ */
+ readonly nextSibling: ChildNode | null;
+ /**
+ * Returns a string appropriate for the type of node.
+ */
+ readonly nodeName: string;
+ /**
+ * Returns the type of node.
+ */
+ readonly nodeType: number;
+ nodeValue: string | null;
+ /**
+ * Returns the node document. Returns null for documents.
+ */
+ readonly ownerDocument: Document | null;
+ /**
+ * Returns the parent element.
+ */
+ readonly parentElement: HTMLElement | null;
+ /**
+ * Returns the parent.
+ */
+ readonly parentNode: Node & ParentNode | null;
+ /**
+ * Returns the previous sibling.
+ */
+ readonly previousSibling: ChildNode | null;
+ textContent: string | null;
+ appendChild<T extends Node>(newChild: T): T;
+ /**
+ * Returns a copy of node. If deep is true, the copy also includes the node's descendants.
+ */
+ cloneNode(deep?: boolean): Node;
+ /**
+ * Returns a bitmask indicating the position of other relative to node.
+ */
+ compareDocumentPosition(other: Node): number;
+ /**
+ * Returns true if other is an inclusive descendant of node, and false otherwise.
+ */
+ contains(other: Node | null): boolean;
+ /**
+ * Returns node's root.
+ */
+ getRootNode(options?: GetRootNodeOptions): Node;
+ /**
+ * Returns whether node has children.
+ */
+ hasChildNodes(): boolean;
+ insertBefore<T extends Node>(newChild: T, refChild: Node | null): T;
+ isDefaultNamespace(namespace: string | null): boolean;
+ /**
+ * Returns whether node and otherNode have the same properties.
+ */
+ isEqualNode(otherNode: Node | null): boolean;
+ isSameNode(otherNode: Node | null): boolean;
+ lookupNamespaceURI(prefix: string | null): string | null;
+ lookupPrefix(namespace: string | null): string | null;
+ /**
+ * Removes empty exclusive Text nodes and concatenates the data of remaining contiguous exclusive Text nodes into the first of their nodes.
+ */
+ normalize(): void;
+ removeChild<T extends Node>(oldChild: T): T;
+ replaceChild<T extends Node>(newChild: Node, oldChild: T): T;
+ readonly ATTRIBUTE_NODE: number;
+ /**
+ * node is a CDATASection node.
+ */
+ readonly CDATA_SECTION_NODE: number;
+ /**
+ * node is a Comment node.
+ */
+ readonly COMMENT_NODE: number;
+ /**
+ * node is a DocumentFragment node.
+ */
+ readonly DOCUMENT_FRAGMENT_NODE: number;
+ /**
+ * node is a document.
+ */
+ readonly DOCUMENT_NODE: number;
+ /**
+ * Set when other is a descendant of node.
+ */
+ readonly DOCUMENT_POSITION_CONTAINED_BY: number;
+ /**
+ * Set when other is an ancestor of node.
+ */
+ readonly DOCUMENT_POSITION_CONTAINS: number;
+ /**
+ * Set when node and other are not in the same tree.
+ */
+ readonly DOCUMENT_POSITION_DISCONNECTED: number;
+ /**
+ * Set when other is following node.
+ */
+ readonly DOCUMENT_POSITION_FOLLOWING: number;
+ readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
+ /**
+ * Set when other is preceding node.
+ */
+ readonly DOCUMENT_POSITION_PRECEDING: number;
+ /**
+ * node is a doctype.
+ */
+ readonly DOCUMENT_TYPE_NODE: number;
+ /**
+ * node is an element.
+ */
+ readonly ELEMENT_NODE: number;
+ readonly ENTITY_NODE: number;
+ readonly ENTITY_REFERENCE_NODE: number;
+ readonly NOTATION_NODE: number;
+ /**
+ * node is a ProcessingInstruction node.
+ */
+ readonly PROCESSING_INSTRUCTION_NODE: number;
+ /**
+ * node is a Text node.
+ */
+ readonly TEXT_NODE: number;
+}
+
+declare var Node: {
+ prototype: Node;
+ new(): Node;
+ readonly ATTRIBUTE_NODE: number;
+ /**
+ * node is a CDATASection node.
+ */
+ readonly CDATA_SECTION_NODE: number;
+ /**
+ * node is a Comment node.
+ */
+ readonly COMMENT_NODE: number;
+ /**
+ * node is a DocumentFragment node.
+ */
+ readonly DOCUMENT_FRAGMENT_NODE: number;
+ /**
+ * node is a document.
+ */
+ readonly DOCUMENT_NODE: number;
+ /**
+ * Set when other is a descendant of node.
+ */
+ readonly DOCUMENT_POSITION_CONTAINED_BY: number;
+ /**
+ * Set when other is an ancestor of node.
+ */
+ readonly DOCUMENT_POSITION_CONTAINS: number;
+ /**
+ * Set when node and other are not in the same tree.
+ */
+ readonly DOCUMENT_POSITION_DISCONNECTED: number;
+ /**
+ * Set when other is following node.
+ */
+ readonly DOCUMENT_POSITION_FOLLOWING: number;
+ readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
+ /**
+ * Set when other is preceding node.
+ */
+ readonly DOCUMENT_POSITION_PRECEDING: number;
+ /**
+ * node is a doctype.
+ */
+ readonly DOCUMENT_TYPE_NODE: number;
+ /**
+ * node is an element.
+ */
+ readonly ELEMENT_NODE: number;
+ readonly ENTITY_NODE: number;
+ readonly ENTITY_REFERENCE_NODE: number;
+ readonly NOTATION_NODE: number;
+ /**
+ * node is a ProcessingInstruction node.
+ */
+ readonly PROCESSING_INSTRUCTION_NODE: number;
+ /**
+ * node is a Text node.
+ */
+ readonly TEXT_NODE: number;
+};
+
+/** An object used to filter the nodes in a NodeIterator or TreeWalker. They don't know anything about the DOM or how to traverse nodes; they just know how to evaluate a single node against the provided filter. */
+interface NodeFilter {
+ acceptNode(node: Node): number;
+}
+
+declare var NodeFilter: {
+ readonly FILTER_ACCEPT: number;
+ readonly FILTER_REJECT: number;
+ readonly FILTER_SKIP: number;
+ readonly SHOW_ALL: number;
+ readonly SHOW_ATTRIBUTE: number;
+ readonly SHOW_CDATA_SECTION: number;
+ readonly SHOW_COMMENT: number;
+ readonly SHOW_DOCUMENT: number;
+ readonly SHOW_DOCUMENT_FRAGMENT: number;
+ readonly SHOW_DOCUMENT_TYPE: number;
+ readonly SHOW_ELEMENT: number;
+ readonly SHOW_ENTITY: number;
+ readonly SHOW_ENTITY_REFERENCE: number;
+ readonly SHOW_NOTATION: number;
+ readonly SHOW_PROCESSING_INSTRUCTION: number;
+ readonly SHOW_TEXT: number;
+};
+
+/** An iterator over the members of a list of the nodes in a subtree of the DOM. The nodes will be returned in document order. */
+interface NodeIterator {
+ readonly filter: NodeFilter | null;
+ readonly pointerBeforeReferenceNode: boolean;
+ readonly referenceNode: Node;
+ readonly root: Node;
+ readonly whatToShow: number;
+ detach(): void;
+ nextNode(): Node | null;
+ previousNode(): Node | null;
+}
+
+declare var NodeIterator: {
+ prototype: NodeIterator;
+ new(): NodeIterator;
+};
+
+/** NodeList objects are collections of nodes, usually returned by properties such as Node.childNodes and methods such as document.querySelectorAll(). */
+interface NodeList {
+ /**
+ * Returns the number of nodes in the collection.
+ */
+ readonly length: number;
+ /**
+ * Returns the node with index index from the collection. The nodes are sorted in tree order.
+ */
+ item(index: number): Node | null;
+ /**
+ * Performs the specified action for each node in an list.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the list.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (value: Node, key: number, parent: NodeList) => void, thisArg?: any): void;
+ [index: number]: Node;
+}
+
+declare var NodeList: {
+ prototype: NodeList;
+ new(): NodeList;
+};
+
+interface NodeListOf<TNode extends Node> extends NodeList {
+ length: number;
+ item(index: number): TNode;
+ /**
+ * Performs the specified action for each node in an list.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the list.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (value: TNode, key: number, parent: NodeListOf<TNode>) => void, thisArg?: any): void;
+ [index: number]: TNode;
+}
+
+interface NonDocumentTypeChildNode {
+ /**
+ * Returns the first following sibling that is an element, and null otherwise.
+ */
+ readonly nextElementSibling: Element | null;
+ /**
+ * Returns the first preceding sibling that is an element, and null otherwise.
+ */
+ readonly previousElementSibling: Element | null;
+}
+
+interface NonElementParentNode {
+ /**
+ * Returns the first element within node's descendants whose ID is elementId.
+ */
+ getElementById(elementId: string): Element | null;
+}
+
+interface NotificationEventMap {
+ "click": Event;
+ "close": Event;
+ "error": Event;
+ "show": Event;
+}
+
+/** This Notifications API interface is used to configure and display desktop notifications to the user. */
+interface Notification extends EventTarget {
+ readonly actions: ReadonlyArray<NotificationAction>;
+ readonly badge: string;
+ readonly body: string;
+ readonly data: any;
+ readonly dir: NotificationDirection;
+ readonly icon: string;
+ readonly image: string;
+ readonly lang: string;
+ onclick: ((this: Notification, ev: Event) => any) | null;
+ onclose: ((this: Notification, ev: Event) => any) | null;
+ onerror: ((this: Notification, ev: Event) => any) | null;
+ onshow: ((this: Notification, ev: Event) => any) | null;
+ readonly renotify: boolean;
+ readonly requireInteraction: boolean;
+ readonly silent: boolean;
+ readonly tag: string;
+ readonly timestamp: number;
+ readonly title: string;
+ readonly vibrate: ReadonlyArray<number>;
+ close(): void;
+ addEventListener<K extends keyof NotificationEventMap>(type: K, listener: (this: Notification, ev: NotificationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof NotificationEventMap>(type: K, listener: (this: Notification, ev: NotificationEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var Notification: {
+ prototype: Notification;
+ new(title: string, options?: NotificationOptions): Notification;
+ readonly maxActions: number;
+ readonly permission: NotificationPermission;
+ requestPermission(deprecatedCallback?: NotificationPermissionCallback): Promise<NotificationPermission>;
+};
+
+/** The OES_element_index_uint extension is part of the WebGL API and adds support for gl.UNSIGNED_INT types to WebGLRenderingContext.drawElements(). */
+interface OES_element_index_uint {
+}
+
+/** The OES_standard_derivatives extension is part of the WebGL API and adds the GLSL derivative functions dFdx, dFdy, and fwidth. */
+interface OES_standard_derivatives {
+ readonly FRAGMENT_SHADER_DERIVATIVE_HINT_OES: GLenum;
+}
+
+/** The OES_texture_float extension is part of the WebGL API and exposes floating-point pixel types for textures. */
+interface OES_texture_float {
+}
+
+/** The OES_texture_float_linear extension is part of the WebGL API and allows linear filtering with floating-point pixel types for textures. */
+interface OES_texture_float_linear {
+}
+
+/** The OES_texture_half_float extension is part of the WebGL API and adds texture formats with 16- (aka half float) and 32-bit floating-point components. */
+interface OES_texture_half_float {
+ readonly HALF_FLOAT_OES: GLenum;
+}
+
+/** The OES_texture_half_float_linear extension is part of the WebGL API and allows linear filtering with half floating-point pixel types for textures. */
+interface OES_texture_half_float_linear {
+}
+
+interface OES_vertex_array_object {
+ bindVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): void;
+ createVertexArrayOES(): WebGLVertexArrayObjectOES | null;
+ deleteVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): void;
+ isVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): GLboolean;
+ readonly VERTEX_ARRAY_BINDING_OES: GLenum;
+}
+
+/** The Web Audio API OfflineAudioCompletionEvent interface represents events that occur when the processing of an OfflineAudioContext is terminated. The complete event implements this interface. */
+interface OfflineAudioCompletionEvent extends Event {
+ readonly renderedBuffer: AudioBuffer;
+}
+
+declare var OfflineAudioCompletionEvent: {
+ prototype: OfflineAudioCompletionEvent;
+ new(type: string, eventInitDict: OfflineAudioCompletionEventInit): OfflineAudioCompletionEvent;
+};
+
+interface OfflineAudioContextEventMap extends BaseAudioContextEventMap {
+ "complete": OfflineAudioCompletionEvent;
+}
+
+/** An AudioContext interface representing an audio-processing graph built from linked together AudioNodes. In contrast with a standard AudioContext, an OfflineAudioContext doesn't render the audio to the device hardware; instead, it generates it, as fast as it can, and outputs the result to an AudioBuffer. */
+interface OfflineAudioContext extends BaseAudioContext {
+ readonly length: number;
+ oncomplete: ((this: OfflineAudioContext, ev: OfflineAudioCompletionEvent) => any) | null;
+ resume(): Promise<void>;
+ startRendering(): Promise<AudioBuffer>;
+ suspend(suspendTime: number): Promise<void>;
+ addEventListener<K extends keyof OfflineAudioContextEventMap>(type: K, listener: (this: OfflineAudioContext, ev: OfflineAudioContextEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof OfflineAudioContextEventMap>(type: K, listener: (this: OfflineAudioContext, ev: OfflineAudioContextEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var OfflineAudioContext: {
+ prototype: OfflineAudioContext;
+ new(contextOptions: OfflineAudioContextOptions): OfflineAudioContext;
+ new(numberOfChannels: number, length: number, sampleRate: number): OfflineAudioContext;
+};
+
+interface OffscreenCanvas extends EventTarget {
+ /**
+ * These attributes return the dimensions of the OffscreenCanvas object's bitmap.
+ *
+ * They can be set, to replace the bitmap with a new, transparent black bitmap of the specified dimensions (effectively resizing it).
+ */
+ height: number;
+ /**
+ * These attributes return the dimensions of the OffscreenCanvas object's bitmap.
+ *
+ * They can be set, to replace the bitmap with a new, transparent black bitmap of the specified dimensions (effectively resizing it).
+ */
+ width: number;
+ /**
+ * Returns a promise that will fulfill with a new Blob object representing a file containing the image in the OffscreenCanvas object.
+ *
+ * The argument, if provided, is a dictionary that controls the encoding options of the image file to be created. The type field specifies the file format and has a default value of "image/png"; that type is also used if the requested type isn't supported. If the image format supports variable quality (such as "image/jpeg"), then the quality field is a number in the range 0.0 to 1.0 inclusive indicating the desired quality level for the resulting image.
+ */
+ convertToBlob(options?: ImageEncodeOptions): Promise<Blob>;
+ /**
+ * Returns an object that exposes an API for drawing on the OffscreenCanvas object. contextId specifies the desired API: "2d", "bitmaprenderer", "webgl", or "webgl2". options is handled by that API.
+ *
+ * This specification defines the "2d" context below, which is similar but distinct from the "2d" context that is created from a canvas element. The WebGL specifications define the "webgl" and "webgl2" contexts. [WEBGL]
+ *
+ * Returns null if the canvas has already been initialized with another context type (e.g., trying to get a "2d" context after getting a "webgl" context).
+ */
+ getContext(contextId: "2d", options?: CanvasRenderingContext2DSettings): OffscreenCanvasRenderingContext2D | null;
+ getContext(contextId: "bitmaprenderer", options?: ImageBitmapRenderingContextSettings): ImageBitmapRenderingContext | null;
+ getContext(contextId: "webgl", options?: WebGLContextAttributes): WebGLRenderingContext | null;
+ getContext(contextId: "webgl2", options?: WebGLContextAttributes): WebGL2RenderingContext | null;
+ getContext(contextId: OffscreenRenderingContextId, options?: any): OffscreenRenderingContext | null;
+ /**
+ * Returns a newly created ImageBitmap object with the image in the OffscreenCanvas object. The image in the OffscreenCanvas object is replaced with a new blank image.
+ */
+ transferToImageBitmap(): ImageBitmap;
+}
+
+declare var OffscreenCanvas: {
+ prototype: OffscreenCanvas;
+ new(width: number, height: number): OffscreenCanvas;
+};
+
+interface OffscreenCanvasRenderingContext2D extends CanvasCompositing, CanvasDrawImage, CanvasDrawPath, CanvasFillStrokeStyles, CanvasFilters, CanvasImageData, CanvasImageSmoothing, CanvasPath, CanvasPathDrawingStyles, CanvasRect, CanvasShadowStyles, CanvasState, CanvasText, CanvasTextDrawingStyles, CanvasTransform {
+ readonly canvas: OffscreenCanvas;
+ commit(): void;
+}
+
+declare var OffscreenCanvasRenderingContext2D: {
+ prototype: OffscreenCanvasRenderingContext2D;
+ new(): OffscreenCanvasRenderingContext2D;
+};
+
+/** The OscillatorNode interface represents a periodic waveform, such as a sine wave. It is an AudioScheduledSourceNode audio-processing module that causes a specified frequency of a given wave to be created—in effect, a constant tone. */
+interface OscillatorNode extends AudioScheduledSourceNode {
+ readonly detune: AudioParam;
+ readonly frequency: AudioParam;
+ type: OscillatorType;
+ setPeriodicWave(periodicWave: PeriodicWave): void;
+ addEventListener<K extends keyof AudioScheduledSourceNodeEventMap>(type: K, listener: (this: OscillatorNode, ev: AudioScheduledSourceNodeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof AudioScheduledSourceNodeEventMap>(type: K, listener: (this: OscillatorNode, ev: AudioScheduledSourceNodeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var OscillatorNode: {
+ prototype: OscillatorNode;
+ new(context: BaseAudioContext, options?: OscillatorOptions): OscillatorNode;
+};
+
+interface OverconstrainedError extends Error {
+ constraint: string;
+}
+
+declare var OverconstrainedError: {
+ prototype: OverconstrainedError;
+ new(): OverconstrainedError;
+};
+
+interface OverflowEvent extends UIEvent {
+ readonly horizontalOverflow: boolean;
+ readonly orient: number;
+ readonly verticalOverflow: boolean;
+ readonly BOTH: number;
+ readonly HORIZONTAL: number;
+ readonly VERTICAL: number;
+}
+
+declare var OverflowEvent: {
+ prototype: OverflowEvent;
+ new(): OverflowEvent;
+ readonly BOTH: number;
+ readonly HORIZONTAL: number;
+ readonly VERTICAL: number;
+};
+
+/** The PageTransitionEvent is fired when a document is being loaded or unloaded. */
+interface PageTransitionEvent extends Event {
+ /**
+ * For the pageshow event, returns false if the page is newly being loaded (and the load event will fire). Otherwise, returns true.
+ *
+ * For the pagehide event, returns false if the page is going away for the last time. Otherwise, returns true, meaning that (if nothing conspires to make the page unsalvageable) the page might be reused if the user navigates back to this page.
+ *
+ * Things that can cause the page to be unsalvageable include:
+ *
+ * Listening for beforeunload events
+ * Listening for unload events
+ * Having iframes that are not salvageable
+ * Active WebSocket objects
+ * Aborting a Document
+ */
+ readonly persisted: boolean;
+}
+
+declare var PageTransitionEvent: {
+ prototype: PageTransitionEvent;
+ new(type: string, eventInitDict?: PageTransitionEventInit): PageTransitionEvent;
+};
+
+/** A PannerNode always has exactly one input and one output: the input can be mono or stereo but the output is always stereo (2 channels); you can't have panning effects without at least two audio channels! */
+interface PannerNode extends AudioNode {
+ coneInnerAngle: number;
+ coneOuterAngle: number;
+ coneOuterGain: number;
+ distanceModel: DistanceModelType;
+ maxDistance: number;
+ readonly orientationX: AudioParam;
+ readonly orientationY: AudioParam;
+ readonly orientationZ: AudioParam;
+ panningModel: PanningModelType;
+ readonly positionX: AudioParam;
+ readonly positionY: AudioParam;
+ readonly positionZ: AudioParam;
+ refDistance: number;
+ rolloffFactor: number;
+ /** @deprecated */
+ setOrientation(x: number, y: number, z: number): void;
+ /** @deprecated */
+ setPosition(x: number, y: number, z: number): void;
+}
+
+declare var PannerNode: {
+ prototype: PannerNode;
+ new(context: BaseAudioContext, options?: PannerOptions): PannerNode;
+};
+
+interface ParentNode {
+ readonly childElementCount: number;
+ /**
+ * Returns the child elements.
+ */
+ readonly children: HTMLCollection;
+ /**
+ * Returns the first child that is an element, and null otherwise.
+ */
+ readonly firstElementChild: Element | null;
+ /**
+ * Returns the last child that is an element, and null otherwise.
+ */
+ readonly lastElementChild: Element | null;
+ /**
+ * Inserts nodes after the last child of node, while replacing strings in nodes with equivalent Text nodes.
+ *
+ * Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
+ */
+ append(...nodes: (Node | string)[]): void;
+ /**
+ * Inserts nodes before the first child of node, while replacing strings in nodes with equivalent Text nodes.
+ *
+ * Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
+ */
+ prepend(...nodes: (Node | string)[]): void;
+ /**
+ * Returns the first element that is a descendant of node that matches selectors.
+ */
+ querySelector<K extends keyof HTMLElementTagNameMap>(selectors: K): HTMLElementTagNameMap[K] | null;
+ querySelector<K extends keyof SVGElementTagNameMap>(selectors: K): SVGElementTagNameMap[K] | null;
+ querySelector<E extends Element = Element>(selectors: string): E | null;
+ /**
+ * Returns all element descendants of node that match selectors.
+ */
+ querySelectorAll<K extends keyof HTMLElementTagNameMap>(selectors: K): NodeListOf<HTMLElementTagNameMap[K]>;
+ querySelectorAll<K extends keyof SVGElementTagNameMap>(selectors: K): NodeListOf<SVGElementTagNameMap[K]>;
+ querySelectorAll<E extends Element = Element>(selectors: string): NodeListOf<E>;
+}
+
+/** This Canvas 2D API interface is used to declare a path that can then be used on a CanvasRenderingContext2D object. The path methods of the CanvasRenderingContext2D interface are also present on this interface, which gives you the convenience of being able to retain and replay your path whenever desired. */
+interface Path2D extends CanvasPath {
+ /**
+ * Adds to the path the path given by the argument.
+ */
+ addPath(path: Path2D, transform?: DOMMatrix2DInit): void;
+}
+
+declare var Path2D: {
+ prototype: Path2D;
+ new(path?: Path2D | string): Path2D;
+};
+
+/** This Payment Request API interface is used to store shipping or payment address information. */
+interface PaymentAddress {
+ readonly addressLine: string[];
+ readonly city: string;
+ readonly country: string;
+ readonly dependentLocality: string;
+ readonly languageCode: string;
+ readonly organization: string;
+ readonly phone: string;
+ readonly postalCode: string;
+ readonly recipient: string;
+ readonly region: string;
+ readonly sortingCode: string;
+ toJSON(): any;
+}
+
+declare var PaymentAddress: {
+ prototype: PaymentAddress;
+ new(): PaymentAddress;
+};
+
+interface PaymentRequestEventMap {
+ "shippingaddresschange": Event;
+ "shippingoptionchange": Event;
+}
+
+/** This Payment Request API interface is the primary access point into the API, and lets web content and apps accept payments from the end user. */
+interface PaymentRequest extends EventTarget {
+ readonly id: string;
+ onshippingaddresschange: ((this: PaymentRequest, ev: Event) => any) | null;
+ onshippingoptionchange: ((this: PaymentRequest, ev: Event) => any) | null;
+ readonly shippingAddress: PaymentAddress | null;
+ readonly shippingOption: string | null;
+ readonly shippingType: PaymentShippingType | null;
+ abort(): Promise<void>;
+ canMakePayment(): Promise<boolean>;
+ show(): Promise<PaymentResponse>;
+ addEventListener<K extends keyof PaymentRequestEventMap>(type: K, listener: (this: PaymentRequest, ev: PaymentRequestEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof PaymentRequestEventMap>(type: K, listener: (this: PaymentRequest, ev: PaymentRequestEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var PaymentRequest: {
+ prototype: PaymentRequest;
+ new(methodData: PaymentMethodData[], details: PaymentDetailsInit, options?: PaymentOptions): PaymentRequest;
+};
+
+/** This Payment Request API interface enables a web page to update the details of a PaymentRequest in response to a user action. */
+interface PaymentRequestUpdateEvent extends Event {
+ updateWith(detailsPromise: PaymentDetailsUpdate | Promise<PaymentDetailsUpdate>): void;
+}
+
+declare var PaymentRequestUpdateEvent: {
+ prototype: PaymentRequestUpdateEvent;
+ new(type: string, eventInitDict?: PaymentRequestUpdateEventInit): PaymentRequestUpdateEvent;
+};
+
+/** This Payment Request API interface is returned after a user selects a payment method and approves a payment request. */
+interface PaymentResponse {
+ readonly details: any;
+ readonly methodName: string;
+ readonly payerEmail: string | null;
+ readonly payerName: string | null;
+ readonly payerPhone: string | null;
+ readonly requestId: string;
+ readonly shippingAddress: PaymentAddress | null;
+ readonly shippingOption: string | null;
+ complete(result?: PaymentComplete): Promise<void>;
+ toJSON(): any;
+}
+
+declare var PaymentResponse: {
+ prototype: PaymentResponse;
+ new(): PaymentResponse;
+};
+
+interface PerfWidgetExternal {
+ readonly activeNetworkRequestCount: number;
+ readonly averageFrameTime: number;
+ readonly averagePaintTime: number;
+ readonly extraInformationEnabled: boolean;
+ readonly independentRenderingEnabled: boolean;
+ readonly irDisablingContentString: string;
+ readonly irStatusAvailable: boolean;
+ readonly maxCpuSpeed: number;
+ readonly paintRequestsPerSecond: number;
+ readonly performanceCounter: number;
+ readonly performanceCounterFrequency: number;
+ addEventListener(eventType: string, callback: Function): void;
+ getMemoryUsage(): number;
+ getProcessCpuUsage(): number;
+ getRecentCpuUsage(last: number | null): any;
+ getRecentFrames(last: number | null): any;
+ getRecentMemoryUsage(last: number | null): any;
+ getRecentPaintRequests(last: number | null): any;
+ removeEventListener(eventType: string, callback: Function): void;
+ repositionWindow(x: number, y: number): void;
+ resizeWindow(width: number, height: number): void;
+}
+
+declare var PerfWidgetExternal: {
+ prototype: PerfWidgetExternal;
+ new(): PerfWidgetExternal;
+};
+
+interface PerformanceEventMap {
+ "resourcetimingbufferfull": Event;
+}
+
+/** Provides access to performance-related information for the current page. It's part of the High Resolution Time API, but is enhanced by the Performance Timeline API, the Navigation Timing API, the User Timing API, and the Resource Timing API. */
+interface Performance extends EventTarget {
+ /** @deprecated */
+ readonly navigation: PerformanceNavigation;
+ onresourcetimingbufferfull: ((this: Performance, ev: Event) => any) | null;
+ readonly timeOrigin: number;
+ /** @deprecated */
+ readonly timing: PerformanceTiming;
+ clearMarks(markName?: string): void;
+ clearMeasures(measureName?: string): void;
+ clearResourceTimings(): void;
+ getEntries(): PerformanceEntryList;
+ getEntriesByName(name: string, type?: string): PerformanceEntryList;
+ getEntriesByType(type: string): PerformanceEntryList;
+ mark(markName: string): void;
+ measure(measureName: string, startMark?: string, endMark?: string): void;
+ now(): number;
+ setResourceTimingBufferSize(maxSize: number): void;
+ toJSON(): any;
+ addEventListener<K extends keyof PerformanceEventMap>(type: K, listener: (this: Performance, ev: PerformanceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof PerformanceEventMap>(type: K, listener: (this: Performance, ev: PerformanceEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var Performance: {
+ prototype: Performance;
+ new(): Performance;
+};
+
+/** Encapsulates a single performance metric that is part of the performance timeline. A performance entry can be directly created by making a performance mark or measure (for example by calling the mark() method) at an explicit point in an application. Performance entries are also created in indirect ways such as loading a resource (such as an image). */
+interface PerformanceEntry {
+ readonly duration: number;
+ readonly entryType: string;
+ readonly name: string;
+ readonly startTime: number;
+ toJSON(): any;
+}
+
+declare var PerformanceEntry: {
+ prototype: PerformanceEntry;
+ new(): PerformanceEntry;
+};
+
+/** PerformanceMark is an abstract interface for PerformanceEntry objects with an entryType of "mark". Entries of this type are created by calling performance.mark() to add a named DOMHighResTimeStamp (the mark) to the browser's performance timeline. */
+interface PerformanceMark extends PerformanceEntry {
+}
+
+declare var PerformanceMark: {
+ prototype: PerformanceMark;
+ new(): PerformanceMark;
+};
+
+/** PerformanceMeasure is an abstract interface for PerformanceEntry objects with an entryType of "measure". Entries of this type are created by calling performance.measure() to add a named DOMHighResTimeStamp (the measure) between two marks to the browser's performance timeline. */
+interface PerformanceMeasure extends PerformanceEntry {
+}
+
+declare var PerformanceMeasure: {
+ prototype: PerformanceMeasure;
+ new(): PerformanceMeasure;
+};
+
+/** The legacy PerformanceNavigation interface represents information about how the navigation to the current document was done. */
+interface PerformanceNavigation {
+ readonly redirectCount: number;
+ readonly type: number;
+ toJSON(): any;
+ readonly TYPE_BACK_FORWARD: number;
+ readonly TYPE_NAVIGATE: number;
+ readonly TYPE_RELOAD: number;
+ readonly TYPE_RESERVED: number;
+}
+
+declare var PerformanceNavigation: {
+ prototype: PerformanceNavigation;
+ new(): PerformanceNavigation;
+ readonly TYPE_BACK_FORWARD: number;
+ readonly TYPE_NAVIGATE: number;
+ readonly TYPE_RELOAD: number;
+ readonly TYPE_RESERVED: number;
+};
+
+/** Provides methods and properties to store and retrieve metrics regarding the browser's document navigation events. For example, this interface can be used to determine how much time it takes to load or unload a document. */
+interface PerformanceNavigationTiming extends PerformanceResourceTiming {
+ readonly domComplete: number;
+ readonly domContentLoadedEventEnd: number;
+ readonly domContentLoadedEventStart: number;
+ readonly domInteractive: number;
+ readonly loadEventEnd: number;
+ readonly loadEventStart: number;
+ readonly redirectCount: number;
+ readonly type: NavigationType;
+ readonly unloadEventEnd: number;
+ readonly unloadEventStart: number;
+ toJSON(): any;
+}
+
+declare var PerformanceNavigationTiming: {
+ prototype: PerformanceNavigationTiming;
+ new(): PerformanceNavigationTiming;
+};
+
+interface PerformanceObserver {
+ disconnect(): void;
+ observe(options?: PerformanceObserverInit): void;
+ takeRecords(): PerformanceEntryList;
+}
+
+declare var PerformanceObserver: {
+ prototype: PerformanceObserver;
+ new(callback: PerformanceObserverCallback): PerformanceObserver;
+ readonly supportedEntryTypes: ReadonlyArray<string>;
+};
+
+interface PerformanceObserverEntryList {
+ getEntries(): PerformanceEntryList;
+ getEntriesByName(name: string, type?: string): PerformanceEntryList;
+ getEntriesByType(type: string): PerformanceEntryList;
+}
+
+declare var PerformanceObserverEntryList: {
+ prototype: PerformanceObserverEntryList;
+ new(): PerformanceObserverEntryList;
+};
+
+/** Enables retrieval and analysis of detailed network timing data regarding the loading of an application's resources. An application can use the timing metrics to determine, for example, the length of time it takes to fetch a specific resource, such as an XMLHttpRequest, <SVG>, image, or script. */
+interface PerformanceResourceTiming extends PerformanceEntry {
+ readonly connectEnd: number;
+ readonly connectStart: number;
+ readonly decodedBodySize: number;
+ readonly domainLookupEnd: number;
+ readonly domainLookupStart: number;
+ readonly encodedBodySize: number;
+ readonly fetchStart: number;
+ readonly initiatorType: string;
+ readonly nextHopProtocol: string;
+ readonly redirectEnd: number;
+ readonly redirectStart: number;
+ readonly requestStart: number;
+ readonly responseEnd: number;
+ readonly responseStart: number;
+ readonly secureConnectionStart: number;
+ readonly transferSize: number;
+ readonly workerStart: number;
+ toJSON(): any;
+}
+
+declare var PerformanceResourceTiming: {
+ prototype: PerformanceResourceTiming;
+ new(): PerformanceResourceTiming;
+};
+
+/** A legacy interface kept for backwards compatibility and contains properties that offer performance timing information for various events which occur during the loading and use of the current page. You get a PerformanceTiming object describing your page using the window.performance.timing property. */
+interface PerformanceTiming {
+ readonly connectEnd: number;
+ readonly connectStart: number;
+ readonly domComplete: number;
+ readonly domContentLoadedEventEnd: number;
+ readonly domContentLoadedEventStart: number;
+ readonly domInteractive: number;
+ readonly domLoading: number;
+ readonly domainLookupEnd: number;
+ readonly domainLookupStart: number;
+ readonly fetchStart: number;
+ readonly loadEventEnd: number;
+ readonly loadEventStart: number;
+ readonly navigationStart: number;
+ readonly redirectEnd: number;
+ readonly redirectStart: number;
+ readonly requestStart: number;
+ readonly responseEnd: number;
+ readonly responseStart: number;
+ readonly secureConnectionStart: number;
+ readonly unloadEventEnd: number;
+ readonly unloadEventStart: number;
+ toJSON(): any;
+}
+
+declare var PerformanceTiming: {
+ prototype: PerformanceTiming;
+ new(): PerformanceTiming;
+};
+
+/** PeriodicWave has no inputs or outputs; it is used to define custom oscillators when calling OscillatorNode.setPeriodicWave(). The PeriodicWave itself is created/returned by AudioContext.createPeriodicWave(). */
+interface PeriodicWave {
+}
+
+declare var PeriodicWave: {
+ prototype: PeriodicWave;
+ new(context: BaseAudioContext, options?: PeriodicWaveOptions): PeriodicWave;
+};
+
+interface PermissionRequest extends DeferredPermissionRequest {
+ readonly state: MSWebViewPermissionState;
+ defer(): void;
+}
+
+declare var PermissionRequest: {
+ prototype: PermissionRequest;
+ new(): PermissionRequest;
+};
+
+interface PermissionRequestedEvent extends Event {
+ readonly permissionRequest: PermissionRequest;
+}
+
+declare var PermissionRequestedEvent: {
+ prototype: PermissionRequestedEvent;
+ new(): PermissionRequestedEvent;
+};
+
+interface PermissionStatusEventMap {
+ "change": Event;
+}
+
+interface PermissionStatus extends EventTarget {
+ onchange: ((this: PermissionStatus, ev: Event) => any) | null;
+ readonly state: PermissionState;
+ addEventListener<K extends keyof PermissionStatusEventMap>(type: K, listener: (this: PermissionStatus, ev: PermissionStatusEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof PermissionStatusEventMap>(type: K, listener: (this: PermissionStatus, ev: PermissionStatusEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var PermissionStatus: {
+ prototype: PermissionStatus;
+ new(): PermissionStatus;
+};
+
+interface Permissions {
+ query(permissionDesc: PermissionDescriptor | DevicePermissionDescriptor | MidiPermissionDescriptor | PushPermissionDescriptor): Promise<PermissionStatus>;
+}
+
+declare var Permissions: {
+ prototype: Permissions;
+ new(): Permissions;
+};
+
+/** Provides information about a browser plugin. */
+interface Plugin {
+ /**
+ * Returns the plugin's description.
+ */
+ readonly description: string;
+ /**
+ * Returns the plugin library's filename, if applicable on the current platform.
+ */
+ readonly filename: string;
+ /**
+ * Returns the number of MIME types, represented by MimeType objects, supported by the plugin.
+ */
+ readonly length: number;
+ /**
+ * Returns the plugin's name.
+ */
+ readonly name: string;
+ /**
+ * Returns the specified MimeType object.
+ */
+ item(index: number): MimeType | null;
+ namedItem(name: string): MimeType | null;
+ [index: number]: MimeType;
+}
+
+declare var Plugin: {
+ prototype: Plugin;
+ new(): Plugin;
+};
+
+/** Used to store a list of Plugin objects describing the available plugins; it's returned by the window.navigator.plugins property. The PluginArray is not a JavaScript array, but has the length property and supports accessing individual items using bracket notation (plugins[2]), as well as via item(index) and namedItem("name") methods. */
+interface PluginArray {
+ readonly length: number;
+ item(index: number): Plugin | null;
+ namedItem(name: string): Plugin | null;
+ refresh(reload?: boolean): void;
+ [index: number]: Plugin;
+}
+
+declare var PluginArray: {
+ prototype: PluginArray;
+ new(): PluginArray;
+};
+
+/** The state of a DOM event produced by a pointer such as the geometry of the contact point, the device type that generated the event, the amount of pressure that was applied on the contact surface, etc. */
+interface PointerEvent extends MouseEvent {
+ readonly height: number;
+ readonly isPrimary: boolean;
+ readonly pointerId: number;
+ readonly pointerType: string;
+ readonly pressure: number;
+ readonly tangentialPressure: number;
+ readonly tiltX: number;
+ readonly tiltY: number;
+ readonly twist: number;
+ readonly width: number;
+}
+
+declare var PointerEvent: {
+ prototype: PointerEvent;
+ new(type: string, eventInitDict?: PointerEventInit): PointerEvent;
+};
+
+/** PopStateEvent is an event handler for the popstate event on the window. */
+interface PopStateEvent extends Event {
+ /**
+ * Returns a copy of the information that was provided to pushState() or replaceState().
+ */
+ readonly state: any;
+}
+
+declare var PopStateEvent: {
+ prototype: PopStateEvent;
+ new(type: string, eventInitDict?: PopStateEventInit): PopStateEvent;
+};
+
+/** The position of the concerned device at a given time. The position, represented by a Coordinates object, comprehends the 2D position of the device, on a spheroid representing the Earth, but also its altitude and its speed. */
+interface Position {
+ readonly coords: Coordinates;
+ readonly timestamp: number;
+}
+
+/** The reason of an error occurring when using the geolocating device. */
+interface PositionError {
+ readonly code: number;
+ readonly message: string;
+ readonly PERMISSION_DENIED: number;
+ readonly POSITION_UNAVAILABLE: number;
+ readonly TIMEOUT: number;
+}
+
+/** A processing instruction embeds application-specific instructions in XML which can be ignored by other applications that don't recognize them. */
+interface ProcessingInstruction extends CharacterData, LinkStyle {
+ readonly ownerDocument: Document;
+ readonly target: string;
+}
+
+declare var ProcessingInstruction: {
+ prototype: ProcessingInstruction;
+ new(): ProcessingInstruction;
+};
+
+/** Events measuring progress of an underlying process, like an HTTP request (for an XMLHttpRequest, or the loading of the underlying resource of an <img>, <audio>, <video>, <style> or <link>). */
+interface ProgressEvent<T extends EventTarget = EventTarget> extends Event {
+ readonly lengthComputable: boolean;
+ readonly loaded: number;
+ readonly target: T | null;
+ readonly total: number;
+}
+
+declare var ProgressEvent: {
+ prototype: ProgressEvent;
+ new(type: string, eventInitDict?: ProgressEventInit): ProgressEvent;
+};
+
+interface PromiseRejectionEvent extends Event {
+ readonly promise: Promise<any>;
+ readonly reason: any;
+}
+
+declare var PromiseRejectionEvent: {
+ prototype: PromiseRejectionEvent;
+ new(type: string, eventInitDict: PromiseRejectionEventInit): PromiseRejectionEvent;
+};
+
+interface PublicKeyCredential extends Credential {
+ readonly rawId: ArrayBuffer;
+ readonly response: AuthenticatorResponse;
+ getClientExtensionResults(): AuthenticationExtensionsClientOutputs;
+}
+
+declare var PublicKeyCredential: {
+ prototype: PublicKeyCredential;
+ new(): PublicKeyCredential;
+ isUserVerifyingPlatformAuthenticatorAvailable(): Promise<boolean>;
+};
+
+/** This Push API interface provides a way to receive notifications from third-party servers as well as request URLs for push notifications. */
+interface PushManager {
+ getSubscription(): Promise<PushSubscription | null>;
+ permissionState(options?: PushSubscriptionOptionsInit): Promise<PushPermissionState>;
+ subscribe(options?: PushSubscriptionOptionsInit): Promise<PushSubscription>;
+}
+
+declare var PushManager: {
+ prototype: PushManager;
+ new(): PushManager;
+ readonly supportedContentEncodings: ReadonlyArray<string>;
+};
+
+/** This Push API interface provides a subcription's URL endpoint and allows unsubscription from a push service. */
+interface PushSubscription {
+ readonly endpoint: string;
+ readonly expirationTime: number | null;
+ readonly options: PushSubscriptionOptions;
+ getKey(name: PushEncryptionKeyName): ArrayBuffer | null;
+ toJSON(): PushSubscriptionJSON;
+ unsubscribe(): Promise<boolean>;
+}
+
+declare var PushSubscription: {
+ prototype: PushSubscription;
+ new(): PushSubscription;
+};
+
+interface PushSubscriptionOptions {
+ readonly applicationServerKey: ArrayBuffer | null;
+ readonly userVisibleOnly: boolean;
+}
+
+declare var PushSubscriptionOptions: {
+ prototype: PushSubscriptionOptions;
+ new(): PushSubscriptionOptions;
+};
+
+interface RTCCertificate {
+ readonly expires: number;
+ getFingerprints(): RTCDtlsFingerprint[];
+}
+
+declare var RTCCertificate: {
+ prototype: RTCCertificate;
+ new(): RTCCertificate;
+ getSupportedAlgorithms(): AlgorithmIdentifier[];
+};
+
+interface RTCDTMFSenderEventMap {
+ "tonechange": RTCDTMFToneChangeEvent;
+}
+
+interface RTCDTMFSender extends EventTarget {
+ readonly canInsertDTMF: boolean;
+ ontonechange: ((this: RTCDTMFSender, ev: RTCDTMFToneChangeEvent) => any) | null;
+ readonly toneBuffer: string;
+ insertDTMF(tones: string, duration?: number, interToneGap?: number): void;
+ addEventListener<K extends keyof RTCDTMFSenderEventMap>(type: K, listener: (this: RTCDTMFSender, ev: RTCDTMFSenderEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof RTCDTMFSenderEventMap>(type: K, listener: (this: RTCDTMFSender, ev: RTCDTMFSenderEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var RTCDTMFSender: {
+ prototype: RTCDTMFSender;
+ new(): RTCDTMFSender;
+};
+
+/** Events sent to indicate that DTMF tones have started or finished playing. This interface is used by the tonechange event. */
+interface RTCDTMFToneChangeEvent extends Event {
+ readonly tone: string;
+}
+
+declare var RTCDTMFToneChangeEvent: {
+ prototype: RTCDTMFToneChangeEvent;
+ new(type: string, eventInitDict: RTCDTMFToneChangeEventInit): RTCDTMFToneChangeEvent;
+};
+
+interface RTCDataChannelEventMap {
+ "bufferedamountlow": Event;
+ "close": Event;
+ "error": RTCErrorEvent;
+ "message": MessageEvent;
+ "open": Event;
+}
+
+interface RTCDataChannel extends EventTarget {
+ binaryType: string;
+ readonly bufferedAmount: number;
+ bufferedAmountLowThreshold: number;
+ readonly id: number | null;
+ readonly label: string;
+ readonly maxPacketLifeTime: number | null;
+ readonly maxRetransmits: number | null;
+ readonly negotiated: boolean;
+ onbufferedamountlow: ((this: RTCDataChannel, ev: Event) => any) | null;
+ onclose: ((this: RTCDataChannel, ev: Event) => any) | null;
+ onerror: ((this: RTCDataChannel, ev: RTCErrorEvent) => any) | null;
+ onmessage: ((this: RTCDataChannel, ev: MessageEvent) => any) | null;
+ onopen: ((this: RTCDataChannel, ev: Event) => any) | null;
+ readonly ordered: boolean;
+ readonly priority: RTCPriorityType;
+ readonly protocol: string;
+ readonly readyState: RTCDataChannelState;
+ close(): void;
+ send(data: string): void;
+ send(data: Blob): void;
+ send(data: ArrayBuffer): void;
+ send(data: ArrayBufferView): void;
+ addEventListener<K extends keyof RTCDataChannelEventMap>(type: K, listener: (this: RTCDataChannel, ev: RTCDataChannelEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof RTCDataChannelEventMap>(type: K, listener: (this: RTCDataChannel, ev: RTCDataChannelEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var RTCDataChannel: {
+ prototype: RTCDataChannel;
+ new(): RTCDataChannel;
+};
+
+interface RTCDataChannelEvent extends Event {
+ readonly channel: RTCDataChannel;
+}
+
+declare var RTCDataChannelEvent: {
+ prototype: RTCDataChannelEvent;
+ new(type: string, eventInitDict: RTCDataChannelEventInit): RTCDataChannelEvent;
+};
+
+interface RTCDtlsTransportEventMap {
+ "error": RTCErrorEvent;
+ "statechange": Event;
+}
+
+interface RTCDtlsTransport extends EventTarget {
+ readonly iceTransport: RTCIceTransport;
+ onerror: ((this: RTCDtlsTransport, ev: RTCErrorEvent) => any) | null;
+ onstatechange: ((this: RTCDtlsTransport, ev: Event) => any) | null;
+ readonly state: RTCDtlsTransportState;
+ getRemoteCertificates(): ArrayBuffer[];
+ addEventListener<K extends keyof RTCDtlsTransportEventMap>(type: K, listener: (this: RTCDtlsTransport, ev: RTCDtlsTransportEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof RTCDtlsTransportEventMap>(type: K, listener: (this: RTCDtlsTransport, ev: RTCDtlsTransportEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var RTCDtlsTransport: {
+ prototype: RTCDtlsTransport;
+ new(): RTCDtlsTransport;
+};
+
+interface RTCDtlsTransportStateChangedEvent extends Event {
+ readonly state: RTCDtlsTransportState;
+}
+
+declare var RTCDtlsTransportStateChangedEvent: {
+ prototype: RTCDtlsTransportStateChangedEvent;
+ new(): RTCDtlsTransportStateChangedEvent;
+};
+
+interface RTCDtmfSenderEventMap {
+ "tonechange": RTCDTMFToneChangeEvent;
+}
+
+interface RTCDtmfSender extends EventTarget {
+ readonly canInsertDTMF: boolean;
+ readonly duration: number;
+ readonly interToneGap: number;
+ ontonechange: ((this: RTCDtmfSender, ev: RTCDTMFToneChangeEvent) => any) | null;
+ readonly sender: RTCRtpSender;
+ readonly toneBuffer: string;
+ insertDTMF(tones: string, duration?: number, interToneGap?: number): void;
+ addEventListener<K extends keyof RTCDtmfSenderEventMap>(type: K, listener: (this: RTCDtmfSender, ev: RTCDtmfSenderEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof RTCDtmfSenderEventMap>(type: K, listener: (this: RTCDtmfSender, ev: RTCDtmfSenderEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var RTCDtmfSender: {
+ prototype: RTCDtmfSender;
+ new(sender: RTCRtpSender): RTCDtmfSender;
+};
+
+interface RTCError extends DOMException {
+ readonly errorDetail: RTCErrorDetailType;
+ readonly httpRequestStatusCode: number | null;
+ readonly receivedAlert: number | null;
+ readonly sctpCauseCode: number | null;
+ readonly sdpLineNumber: number | null;
+ readonly sentAlert: number | null;
+}
+
+declare var RTCError: {
+ prototype: RTCError;
+ new(init: RTCErrorInit, message?: string): RTCError;
+};
+
+interface RTCErrorEvent extends Event {
+ readonly error: RTCError;
+}
+
+declare var RTCErrorEvent: {
+ prototype: RTCErrorEvent;
+ new(type: string, eventInitDict: RTCErrorEventInit): RTCErrorEvent;
+};
+
+/** The RTCIceCandidate interface—part of the WebRTC API—represents a candidate Internet Connectivity Establishment (ICE) configuration which may be used to establish an RTCPeerConnection. */
+interface RTCIceCandidate {
+ readonly candidate: string;
+ readonly component: RTCIceComponent | null;
+ readonly foundation: string | null;
+ readonly port: number | null;
+ readonly priority: number | null;
+ readonly protocol: RTCIceProtocol | null;
+ readonly relatedAddress: string | null;
+ readonly relatedPort: number | null;
+ readonly sdpMLineIndex: number | null;
+ readonly sdpMid: string | null;
+ readonly tcpType: RTCIceTcpCandidateType | null;
+ readonly type: RTCIceCandidateType | null;
+ readonly usernameFragment: string | null;
+ toJSON(): RTCIceCandidateInit;
+}
+
+declare var RTCIceCandidate: {
+ prototype: RTCIceCandidate;
+ new(candidateInitDict?: RTCIceCandidateInit): RTCIceCandidate;
+};
+
+interface RTCIceCandidatePairChangedEvent extends Event {
+ readonly pair: RTCIceCandidatePair;
+}
+
+declare var RTCIceCandidatePairChangedEvent: {
+ prototype: RTCIceCandidatePairChangedEvent;
+ new(): RTCIceCandidatePairChangedEvent;
+};
+
+interface RTCIceGathererEventMap {
+ "error": Event;
+ "localcandidate": RTCIceGathererEvent;
+}
+
+interface RTCIceGatherer extends RTCStatsProvider {
+ readonly component: RTCIceComponent;
+ onerror: ((this: RTCIceGatherer, ev: Event) => any) | null;
+ onlocalcandidate: ((this: RTCIceGatherer, ev: RTCIceGathererEvent) => any) | null;
+ createAssociatedGatherer(): RTCIceGatherer;
+ getLocalCandidates(): RTCIceCandidateDictionary[];
+ getLocalParameters(): RTCIceParameters;
+ addEventListener<K extends keyof RTCIceGathererEventMap>(type: K, listener: (this: RTCIceGatherer, ev: RTCIceGathererEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof RTCIceGathererEventMap>(type: K, listener: (this: RTCIceGatherer, ev: RTCIceGathererEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var RTCIceGatherer: {
+ prototype: RTCIceGatherer;
+ new(options: RTCIceGatherOptions): RTCIceGatherer;
+};
+
+interface RTCIceGathererEvent extends Event {
+ readonly candidate: RTCIceCandidateDictionary | RTCIceCandidateComplete;
+}
+
+declare var RTCIceGathererEvent: {
+ prototype: RTCIceGathererEvent;
+ new(): RTCIceGathererEvent;
+};
+
+interface RTCIceTransportEventMap {
+ "gatheringstatechange": Event;
+ "selectedcandidatepairchange": Event;
+ "statechange": Event;
+}
+
+/** Provides access to information about the ICE transport layer over which the data is being sent and received. */
+interface RTCIceTransport extends EventTarget {
+ readonly component: RTCIceComponent;
+ readonly gatheringState: RTCIceGathererState;
+ ongatheringstatechange: ((this: RTCIceTransport, ev: Event) => any) | null;
+ onselectedcandidatepairchange: ((this: RTCIceTransport, ev: Event) => any) | null;
+ onstatechange: ((this: RTCIceTransport, ev: Event) => any) | null;
+ readonly role: RTCIceRole;
+ readonly state: RTCIceTransportState;
+ getLocalCandidates(): RTCIceCandidate[];
+ getLocalParameters(): RTCIceParameters | null;
+ getRemoteCandidates(): RTCIceCandidate[];
+ getRemoteParameters(): RTCIceParameters | null;
+ getSelectedCandidatePair(): RTCIceCandidatePair | null;
+ addEventListener<K extends keyof RTCIceTransportEventMap>(type: K, listener: (this: RTCIceTransport, ev: RTCIceTransportEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof RTCIceTransportEventMap>(type: K, listener: (this: RTCIceTransport, ev: RTCIceTransportEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var RTCIceTransport: {
+ prototype: RTCIceTransport;
+ new(): RTCIceTransport;
+};
+
+interface RTCIceTransportStateChangedEvent extends Event {
+ readonly state: RTCIceTransportState;
+}
+
+declare var RTCIceTransportStateChangedEvent: {
+ prototype: RTCIceTransportStateChangedEvent;
+ new(): RTCIceTransportStateChangedEvent;
+};
+
+interface RTCIdentityAssertion {
+ idp: string;
+ name: string;
+}
+
+declare var RTCIdentityAssertion: {
+ prototype: RTCIdentityAssertion;
+ new(idp: string, name: string): RTCIdentityAssertion;
+};
+
+interface RTCPeerConnectionEventMap {
+ "connectionstatechange": Event;
+ "datachannel": RTCDataChannelEvent;
+ "icecandidate": RTCPeerConnectionIceEvent;
+ "icecandidateerror": RTCPeerConnectionIceErrorEvent;
+ "iceconnectionstatechange": Event;
+ "icegatheringstatechange": Event;
+ "negotiationneeded": Event;
+ "signalingstatechange": Event;
+ "statsended": RTCStatsEvent;
+ "track": RTCTrackEvent;
+}
+
+/** A WebRTC connection between the local computer and a remote peer. It provides methods to connect to a remote peer, maintain and monitor the connection, and close the connection once it's no longer needed. */
+interface RTCPeerConnection extends EventTarget {
+ readonly canTrickleIceCandidates: boolean | null;
+ readonly connectionState: RTCPeerConnectionState;
+ readonly currentLocalDescription: RTCSessionDescription | null;
+ readonly currentRemoteDescription: RTCSessionDescription | null;
+ readonly iceConnectionState: RTCIceConnectionState;
+ readonly iceGatheringState: RTCIceGatheringState;
+ readonly idpErrorInfo: string | null;
+ readonly idpLoginUrl: string | null;
+ readonly localDescription: RTCSessionDescription | null;
+ onconnectionstatechange: ((this: RTCPeerConnection, ev: Event) => any) | null;
+ ondatachannel: ((this: RTCPeerConnection, ev: RTCDataChannelEvent) => any) | null;
+ onicecandidate: ((this: RTCPeerConnection, ev: RTCPeerConnectionIceEvent) => any) | null;
+ onicecandidateerror: ((this: RTCPeerConnection, ev: RTCPeerConnectionIceErrorEvent) => any) | null;
+ oniceconnectionstatechange: ((this: RTCPeerConnection, ev: Event) => any) | null;
+ onicegatheringstatechange: ((this: RTCPeerConnection, ev: Event) => any) | null;
+ onnegotiationneeded: ((this: RTCPeerConnection, ev: Event) => any) | null;
+ onsignalingstatechange: ((this: RTCPeerConnection, ev: Event) => any) | null;
+ onstatsended: ((this: RTCPeerConnection, ev: RTCStatsEvent) => any) | null;
+ ontrack: ((this: RTCPeerConnection, ev: RTCTrackEvent) => any) | null;
+ readonly peerIdentity: Promise<RTCIdentityAssertion>;
+ readonly pendingLocalDescription: RTCSessionDescription | null;
+ readonly pendingRemoteDescription: RTCSessionDescription | null;
+ readonly remoteDescription: RTCSessionDescription | null;
+ readonly sctp: RTCSctpTransport | null;
+ readonly signalingState: RTCSignalingState;
+ addIceCandidate(candidate: RTCIceCandidateInit | RTCIceCandidate): Promise<void>;
+ addTrack(track: MediaStreamTrack, ...streams: MediaStream[]): RTCRtpSender;
+ addTransceiver(trackOrKind: MediaStreamTrack | string, init?: RTCRtpTransceiverInit): RTCRtpTransceiver;
+ close(): void;
+ createAnswer(options?: RTCOfferOptions): Promise<RTCSessionDescriptionInit>;
+ createDataChannel(label: string, dataChannelDict?: RTCDataChannelInit): RTCDataChannel;
+ createOffer(options?: RTCOfferOptions): Promise<RTCSessionDescriptionInit>;
+ getConfiguration(): RTCConfiguration;
+ getIdentityAssertion(): Promise<string>;
+ getReceivers(): RTCRtpReceiver[];
+ getSenders(): RTCRtpSender[];
+ getStats(selector?: MediaStreamTrack | null): Promise<RTCStatsReport>;
+ getTransceivers(): RTCRtpTransceiver[];
+ removeTrack(sender: RTCRtpSender): void;
+ setConfiguration(configuration: RTCConfiguration): void;
+ setIdentityProvider(provider: string, options?: RTCIdentityProviderOptions): void;
+ setLocalDescription(description: RTCSessionDescriptionInit): Promise<void>;
+ setRemoteDescription(description: RTCSessionDescriptionInit): Promise<void>;
+ addEventListener<K extends keyof RTCPeerConnectionEventMap>(type: K, listener: (this: RTCPeerConnection, ev: RTCPeerConnectionEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof RTCPeerConnectionEventMap>(type: K, listener: (this: RTCPeerConnection, ev: RTCPeerConnectionEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var RTCPeerConnection: {
+ prototype: RTCPeerConnection;
+ new(configuration?: RTCConfiguration): RTCPeerConnection;
+ generateCertificate(keygenAlgorithm: AlgorithmIdentifier): Promise<RTCCertificate>;
+ getDefaultIceServers(): RTCIceServer[];
+};
+
+interface RTCPeerConnectionIceErrorEvent extends Event {
+ readonly errorCode: number;
+ readonly errorText: string;
+ readonly hostCandidate: string;
+ readonly url: string;
+}
+
+declare var RTCPeerConnectionIceErrorEvent: {
+ prototype: RTCPeerConnectionIceErrorEvent;
+ new(type: string, eventInitDict: RTCPeerConnectionIceErrorEventInit): RTCPeerConnectionIceErrorEvent;
+};
+
+/** Events that occurs in relation to ICE candidates with the target, usually an RTCPeerConnection. Only one event is of this type: icecandidate. */
+interface RTCPeerConnectionIceEvent extends Event {
+ readonly candidate: RTCIceCandidate | null;
+ readonly url: string | null;
+}
+
+declare var RTCPeerConnectionIceEvent: {
+ prototype: RTCPeerConnectionIceEvent;
+ new(type: string, eventInitDict?: RTCPeerConnectionIceEventInit): RTCPeerConnectionIceEvent;
+};
+
+/** This WebRTC API interface manages the reception and decoding of data for a MediaStreamTrack on an RTCPeerConnection. */
+interface RTCRtpReceiver {
+ readonly rtcpTransport: RTCDtlsTransport | null;
+ readonly track: MediaStreamTrack;
+ readonly transport: RTCDtlsTransport | null;
+ getContributingSources(): RTCRtpContributingSource[];
+ getParameters(): RTCRtpReceiveParameters;
+ getStats(): Promise<RTCStatsReport>;
+ getSynchronizationSources(): RTCRtpSynchronizationSource[];
+}
+
+declare var RTCRtpReceiver: {
+ prototype: RTCRtpReceiver;
+ new(): RTCRtpReceiver;
+ getCapabilities(kind: string): RTCRtpCapabilities | null;
+};
+
+/** Provides the ability to control and obtain details about how a particular MediaStreamTrack is encoded and sent to a remote peer. */
+interface RTCRtpSender {
+ readonly dtmf: RTCDTMFSender | null;
+ readonly rtcpTransport: RTCDtlsTransport | null;
+ readonly track: MediaStreamTrack | null;
+ readonly transport: RTCDtlsTransport | null;
+ getParameters(): RTCRtpSendParameters;
+ getStats(): Promise<RTCStatsReport>;
+ replaceTrack(withTrack: MediaStreamTrack | null): Promise<void>;
+ setParameters(parameters: RTCRtpSendParameters): Promise<void>;
+ setStreams(...streams: MediaStream[]): void;
+}
+
+declare var RTCRtpSender: {
+ prototype: RTCRtpSender;
+ new(): RTCRtpSender;
+ getCapabilities(kind: string): RTCRtpCapabilities | null;
+};
+
+interface RTCRtpTransceiver {
+ readonly currentDirection: RTCRtpTransceiverDirection | null;
+ direction: RTCRtpTransceiverDirection;
+ readonly mid: string | null;
+ readonly receiver: RTCRtpReceiver;
+ readonly sender: RTCRtpSender;
+ setCodecPreferences(codecs: RTCRtpCodecCapability[]): void;
+ stop(): void;
+}
+
+declare var RTCRtpTransceiver: {
+ prototype: RTCRtpTransceiver;
+ new(): RTCRtpTransceiver;
+};
+
+interface RTCSctpTransportEventMap {
+ "statechange": Event;
+}
+
+interface RTCSctpTransport extends EventTarget {
+ readonly maxChannels: number | null;
+ readonly maxMessageSize: number;
+ onstatechange: ((this: RTCSctpTransport, ev: Event) => any) | null;
+ readonly state: RTCSctpTransportState;
+ readonly transport: RTCDtlsTransport;
+ addEventListener<K extends keyof RTCSctpTransportEventMap>(type: K, listener: (this: RTCSctpTransport, ev: RTCSctpTransportEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof RTCSctpTransportEventMap>(type: K, listener: (this: RTCSctpTransport, ev: RTCSctpTransportEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var RTCSctpTransport: {
+ prototype: RTCSctpTransport;
+ new(): RTCSctpTransport;
+};
+
+/** One end of a connection—or potential connection—and how it's configured. Each RTCSessionDescription consists of a description type indicating which part of the offer/answer negotiation process it describes and of the SDP descriptor of the session. */
+interface RTCSessionDescription {
+ readonly sdp: string;
+ readonly type: RTCSdpType;
+ toJSON(): any;
+}
+
+declare var RTCSessionDescription: {
+ prototype: RTCSessionDescription;
+ new(descriptionInitDict?: RTCSessionDescriptionInit): RTCSessionDescription;
+};
+
+interface RTCSrtpSdesTransportEventMap {
+ "error": Event;
+}
+
+interface RTCSrtpSdesTransport extends EventTarget {
+ onerror: ((this: RTCSrtpSdesTransport, ev: Event) => any) | null;
+ readonly transport: RTCIceTransport;
+ addEventListener<K extends keyof RTCSrtpSdesTransportEventMap>(type: K, listener: (this: RTCSrtpSdesTransport, ev: RTCSrtpSdesTransportEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof RTCSrtpSdesTransportEventMap>(type: K, listener: (this: RTCSrtpSdesTransport, ev: RTCSrtpSdesTransportEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var RTCSrtpSdesTransport: {
+ prototype: RTCSrtpSdesTransport;
+ new(transport: RTCIceTransport, encryptParameters: RTCSrtpSdesParameters, decryptParameters: RTCSrtpSdesParameters): RTCSrtpSdesTransport;
+ getLocalParameters(): RTCSrtpSdesParameters[];
+};
+
+interface RTCSsrcConflictEvent extends Event {
+ readonly ssrc: number;
+}
+
+declare var RTCSsrcConflictEvent: {
+ prototype: RTCSsrcConflictEvent;
+ new(): RTCSsrcConflictEvent;
+};
+
+interface RTCStatsEvent extends Event {
+ readonly report: RTCStatsReport;
+}
+
+declare var RTCStatsEvent: {
+ prototype: RTCStatsEvent;
+ new(type: string, eventInitDict: RTCStatsEventInit): RTCStatsEvent;
+};
+
+interface RTCStatsProvider extends EventTarget {
+ getStats(): Promise<RTCStatsReport>;
+ msGetStats(): Promise<RTCStatsReport>;
+}
+
+declare var RTCStatsProvider: {
+ prototype: RTCStatsProvider;
+ new(): RTCStatsProvider;
+};
+
+interface RTCStatsReport {
+ forEach(callbackfn: (value: any, key: string, parent: RTCStatsReport) => void, thisArg?: any): void;
+}
+
+declare var RTCStatsReport: {
+ prototype: RTCStatsReport;
+ new(): RTCStatsReport;
+};
+
+interface RTCTrackEvent extends Event {
+ readonly receiver: RTCRtpReceiver;
+ readonly streams: ReadonlyArray<MediaStream>;
+ readonly track: MediaStreamTrack;
+ readonly transceiver: RTCRtpTransceiver;
+}
+
+declare var RTCTrackEvent: {
+ prototype: RTCTrackEvent;
+ new(type: string, eventInitDict: RTCTrackEventInit): RTCTrackEvent;
+};
+
+interface RadioNodeList extends NodeList {
+ value: string;
+}
+
+declare var RadioNodeList: {
+ prototype: RadioNodeList;
+ new(): RadioNodeList;
+};
+
+interface RandomSource {
+ getRandomValues<T extends Int8Array | Uint8ClampedArray | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array>(array: T): T;
+}
+
+declare var RandomSource: {
+ prototype: RandomSource;
+ new(): RandomSource;
+};
+
+/** A fragment of a document that can contain nodes and parts of text nodes. */
+interface Range extends AbstractRange {
+ /**
+ * Returns the node, furthest away from the document, that is an ancestor of both range's start node and end node.
+ */
+ readonly commonAncestorContainer: Node;
+ cloneContents(): DocumentFragment;
+ cloneRange(): Range;
+ collapse(toStart?: boolean): void;
+ compareBoundaryPoints(how: number, sourceRange: Range): number;
+ /**
+ * Returns −1 if the point is before the range, 0 if the point is in the range, and 1 if the point is after the range.
+ */
+ comparePoint(node: Node, offset: number): number;
+ createContextualFragment(fragment: string): DocumentFragment;
+ deleteContents(): void;
+ detach(): void;
+ extractContents(): DocumentFragment;
+ getBoundingClientRect(): DOMRect;
+ getClientRects(): DOMRectList;
+ insertNode(node: Node): void;
+ /**
+ * Returns whether range intersects node.
+ */
+ intersectsNode(node: Node): boolean;
+ isPointInRange(node: Node, offset: number): boolean;
+ selectNode(node: Node): void;
+ selectNodeContents(node: Node): void;
+ setEnd(node: Node, offset: number): void;
+ setEndAfter(node: Node): void;
+ setEndBefore(node: Node): void;
+ setStart(node: Node, offset: number): void;
+ setStartAfter(node: Node): void;
+ setStartBefore(node: Node): void;
+ surroundContents(newParent: Node): void;
+ toString(): string;
+ readonly END_TO_END: number;
+ readonly END_TO_START: number;
+ readonly START_TO_END: number;
+ readonly START_TO_START: number;
+}
+
+declare var Range: {
+ prototype: Range;
+ new(): Range;
+ readonly END_TO_END: number;
+ readonly END_TO_START: number;
+ readonly START_TO_END: number;
+ readonly START_TO_START: number;
+ toString(): string;
+};
+
+interface ReadableByteStreamController {
+ readonly byobRequest: ReadableStreamBYOBRequest | undefined;
+ readonly desiredSize: number | null;
+ close(): void;
+ enqueue(chunk: ArrayBufferView): void;
+ error(error?: any): void;
+}
+
+/** This Streams API interface 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. */
+interface ReadableStream<R = any> {
+ readonly locked: boolean;
+ cancel(reason?: any): Promise<void>;
+ getReader(options: { mode: "byob" }): ReadableStreamBYOBReader;
+ getReader(): ReadableStreamDefaultReader<R>;
+ pipeThrough<T>({ writable, readable }: { writable: WritableStream<R>, readable: ReadableStream<T> }, options?: PipeOptions): ReadableStream<T>;
+ pipeTo(dest: WritableStream<R>, options?: PipeOptions): Promise<void>;
+ tee(): [ReadableStream<R>, ReadableStream<R>];
+}
+
+declare var ReadableStream: {
+ prototype: ReadableStream;
+ new(underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number, size?: undefined }): ReadableStream<Uint8Array>;
+ new<R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
+};
+
+interface ReadableStreamBYOBReader {
+ readonly closed: Promise<void>;
+ cancel(reason?: any): Promise<void>;
+ read<T extends ArrayBufferView>(view: T): Promise<ReadableStreamReadResult<T>>;
+ releaseLock(): void;
+}
+
+interface ReadableStreamBYOBRequest {
+ readonly view: ArrayBufferView;
+ respond(bytesWritten: number): void;
+ respondWithNewView(view: ArrayBufferView): void;
+}
+
+interface ReadableStreamDefaultController<R = any> {
+ readonly desiredSize: number | null;
+ close(): void;
+ enqueue(chunk: R): void;
+ error(error?: any): void;
+}
+
+interface ReadableStreamDefaultReader<R = any> {
+ readonly closed: Promise<void>;
+ cancel(reason?: any): Promise<void>;
+ read(): Promise<ReadableStreamReadResult<R>>;
+ releaseLock(): void;
+}
+
+interface ReadableStreamReader<R = any> {
+ cancel(): Promise<void>;
+ read(): Promise<ReadableStreamReadResult<R>>;
+ releaseLock(): void;
+}
+
+declare var ReadableStreamReader: {
+ prototype: ReadableStreamReader;
+ new(): ReadableStreamReader;
+};
+
+/** This Fetch API interface represents a resource request. */
+interface Request extends Body {
+ /**
+ * Returns the cache mode associated with request, which is a string indicating how the request will interact with the browser's cache when fetching.
+ */
+ readonly cache: RequestCache;
+ /**
+ * Returns the credentials mode associated with request, which is a string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL.
+ */
+ readonly credentials: RequestCredentials;
+ /**
+ * Returns the kind of resource requested by request, e.g., "document" or "script".
+ */
+ readonly destination: RequestDestination;
+ /**
+ * Returns a Headers object consisting of the headers associated with request. Note that headers added in the network layer by the user agent will not be accounted for in this object, e.g., the "Host" header.
+ */
+ readonly headers: Headers;
+ /**
+ * Returns request's subresource integrity metadata, which is a cryptographic hash of the resource being fetched. Its value consists of multiple hashes separated by whitespace. [SRI]
+ */
+ readonly integrity: string;
+ /**
+ * Returns a boolean indicating whether or not request is for a history navigation (a.k.a. back-foward navigation).
+ */
+ readonly isHistoryNavigation: boolean;
+ /**
+ * Returns a boolean indicating whether or not request is for a reload navigation.
+ */
+ readonly isReloadNavigation: boolean;
+ /**
+ * Returns a boolean indicating whether or not request can outlive the global in which it was created.
+ */
+ readonly keepalive: boolean;
+ /**
+ * Returns request's HTTP method, which is "GET" by default.
+ */
+ readonly method: string;
+ /**
+ * Returns the mode associated with request, which is a string indicating whether the request will use CORS, or will be restricted to same-origin URLs.
+ */
+ readonly mode: RequestMode;
+ /**
+ * Returns the redirect mode associated with request, which is a string indicating how redirects for the request will be handled during fetching. A request will follow redirects by default.
+ */
+ readonly redirect: RequestRedirect;
+ /**
+ * Returns the referrer of request. Its value can be a same-origin URL if explicitly set in init, the empty string to indicate no referrer, and "about:client" when defaulting to the global's default. This is used during fetching to determine the value of the `Referer` header of the request being made.
+ */
+ readonly referrer: string;
+ /**
+ * Returns the referrer policy associated with request. This is used during fetching to compute the value of the request's referrer.
+ */
+ readonly referrerPolicy: ReferrerPolicy;
+ /**
+ * Returns the signal associated with request, which is an AbortSignal object indicating whether or not request has been aborted, and its abort event handler.
+ */
+ readonly signal: AbortSignal;
+ /**
+ * Returns the URL of request as a string.
+ */
+ readonly url: string;
+ clone(): Request;
+}
+
+declare var Request: {
+ prototype: Request;
+ new(input: RequestInfo, init?: RequestInit): Request;
+};
+
+/** This Fetch API interface represents the response to a request. */
+interface Response extends Body {
+ readonly headers: Headers;
+ readonly ok: boolean;
+ readonly redirected: boolean;
+ readonly status: number;
+ readonly statusText: string;
+ readonly trailer: Promise<Headers>;
+ readonly type: ResponseType;
+ readonly url: string;
+ clone(): Response;
+}
+
+declare var Response: {
+ prototype: Response;
+ new(body?: BodyInit | null, init?: ResponseInit): Response;
+ error(): Response;
+ redirect(url: string, status?: number): Response;
+};
+
+/** Provides access to the properties of <a> element, as well as methods to manipulate them. */
+interface SVGAElement extends SVGGraphicsElement, SVGURIReference {
+ readonly target: SVGAnimatedString;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGAElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGAElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGAElement: {
+ prototype: SVGAElement;
+ new(): SVGAElement;
+};
+
+/** Used to represent a value that can be an <angle> or <number> value. An SVGAngle reflected through the animVal attribute is always read only. */
+interface SVGAngle {
+ readonly unitType: number;
+ value: number;
+ valueAsString: string;
+ valueInSpecifiedUnits: number;
+ convertToSpecifiedUnits(unitType: number): void;
+ newValueSpecifiedUnits(unitType: number, valueInSpecifiedUnits: number): void;
+ readonly SVG_ANGLETYPE_DEG: number;
+ readonly SVG_ANGLETYPE_GRAD: number;
+ readonly SVG_ANGLETYPE_RAD: number;
+ readonly SVG_ANGLETYPE_UNKNOWN: number;
+ readonly SVG_ANGLETYPE_UNSPECIFIED: number;
+}
+
+declare var SVGAngle: {
+ prototype: SVGAngle;
+ new(): SVGAngle;
+ readonly SVG_ANGLETYPE_DEG: number;
+ readonly SVG_ANGLETYPE_GRAD: number;
+ readonly SVG_ANGLETYPE_RAD: number;
+ readonly SVG_ANGLETYPE_UNKNOWN: number;
+ readonly SVG_ANGLETYPE_UNSPECIFIED: number;
+};
+
+interface SVGAnimateElement extends SVGAnimationElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGAnimateElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGAnimateElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGAnimateElement: {
+ prototype: SVGAnimateElement;
+ new(): SVGAnimateElement;
+};
+
+interface SVGAnimateMotionElement extends SVGAnimationElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGAnimateMotionElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGAnimateMotionElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGAnimateMotionElement: {
+ prototype: SVGAnimateMotionElement;
+ new(): SVGAnimateMotionElement;
+};
+
+interface SVGAnimateTransformElement extends SVGAnimationElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGAnimateTransformElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGAnimateTransformElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGAnimateTransformElement: {
+ prototype: SVGAnimateTransformElement;
+ new(): SVGAnimateTransformElement;
+};
+
+/** Used for attributes of basic type <angle> which can be animated. */
+interface SVGAnimatedAngle {
+ readonly animVal: SVGAngle;
+ readonly baseVal: SVGAngle;
+}
+
+declare var SVGAnimatedAngle: {
+ prototype: SVGAnimatedAngle;
+ new(): SVGAnimatedAngle;
+};
+
+/** Used for attributes of type boolean which can be animated. */
+interface SVGAnimatedBoolean {
+ readonly animVal: boolean;
+ baseVal: boolean;
+}
+
+declare var SVGAnimatedBoolean: {
+ prototype: SVGAnimatedBoolean;
+ new(): SVGAnimatedBoolean;
+};
+
+/** Used for attributes whose value must be a constant from a particular enumeration and which can be animated. */
+interface SVGAnimatedEnumeration {
+ readonly animVal: number;
+ baseVal: number;
+}
+
+declare var SVGAnimatedEnumeration: {
+ prototype: SVGAnimatedEnumeration;
+ new(): SVGAnimatedEnumeration;
+};
+
+/** Used for attributes of basic type <integer> which can be animated. */
+interface SVGAnimatedInteger {
+ readonly animVal: number;
+ baseVal: number;
+}
+
+declare var SVGAnimatedInteger: {
+ prototype: SVGAnimatedInteger;
+ new(): SVGAnimatedInteger;
+};
+
+/** Used for attributes of basic type <length> which can be animated. */
+interface SVGAnimatedLength {
+ readonly animVal: SVGLength;
+ readonly baseVal: SVGLength;
+}
+
+declare var SVGAnimatedLength: {
+ prototype: SVGAnimatedLength;
+ new(): SVGAnimatedLength;
+};
+
+/** Used for attributes of type SVGLengthList which can be animated. */
+interface SVGAnimatedLengthList {
+ readonly animVal: SVGLengthList;
+ readonly baseVal: SVGLengthList;
+}
+
+declare var SVGAnimatedLengthList: {
+ prototype: SVGAnimatedLengthList;
+ new(): SVGAnimatedLengthList;
+};
+
+/** Used for attributes of basic type <Number> which can be animated. */
+interface SVGAnimatedNumber {
+ readonly animVal: number;
+ baseVal: number;
+}
+
+declare var SVGAnimatedNumber: {
+ prototype: SVGAnimatedNumber;
+ new(): SVGAnimatedNumber;
+};
+
+/** The SVGAnimatedNumber interface is used for attributes which take a list of numbers and which can be animated. */
+interface SVGAnimatedNumberList {
+ readonly animVal: SVGNumberList;
+ readonly baseVal: SVGNumberList;
+}
+
+declare var SVGAnimatedNumberList: {
+ prototype: SVGAnimatedNumberList;
+ new(): SVGAnimatedNumberList;
+};
+
+interface SVGAnimatedPoints {
+ readonly animatedPoints: SVGPointList;
+ readonly points: SVGPointList;
+}
+
+/** Used for attributes of type SVGPreserveAspectRatio which can be animated. */
+interface SVGAnimatedPreserveAspectRatio {
+ readonly animVal: SVGPreserveAspectRatio;
+ readonly baseVal: SVGPreserveAspectRatio;
+}
+
+declare var SVGAnimatedPreserveAspectRatio: {
+ prototype: SVGAnimatedPreserveAspectRatio;
+ new(): SVGAnimatedPreserveAspectRatio;
+};
+
+/** Used for attributes of basic SVGRect which can be animated. */
+interface SVGAnimatedRect {
+ readonly animVal: DOMRectReadOnly;
+ readonly baseVal: DOMRect;
+}
+
+declare var SVGAnimatedRect: {
+ prototype: SVGAnimatedRect;
+ new(): SVGAnimatedRect;
+};
+
+/** The SVGAnimatedString interface represents string attributes which can be animated from each SVG declaration. You need to create SVG attribute before doing anything else, everything should be declared inside this. */
+interface SVGAnimatedString {
+ readonly animVal: string;
+ baseVal: string;
+}
+
+declare var SVGAnimatedString: {
+ prototype: SVGAnimatedString;
+ new(): SVGAnimatedString;
+};
+
+/** Used for attributes which take a list of numbers and which can be animated. */
+interface SVGAnimatedTransformList {
+ readonly animVal: SVGTransformList;
+ readonly baseVal: SVGTransformList;
+}
+
+declare var SVGAnimatedTransformList: {
+ prototype: SVGAnimatedTransformList;
+ new(): SVGAnimatedTransformList;
+};
+
+interface SVGAnimationElement extends SVGElement {
+ readonly targetElement: SVGElement;
+ getCurrentTime(): number;
+ getSimpleDuration(): number;
+ getStartTime(): number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGAnimationElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGAnimationElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGAnimationElement: {
+ prototype: SVGAnimationElement;
+ new(): SVGAnimationElement;
+};
+
+/** An interface for the <circle> element. The circle element is defined by the cx and cy attributes that denote the coordinates of the centre of the circle. */
+interface SVGCircleElement extends SVGGeometryElement {
+ readonly cx: SVGAnimatedLength;
+ readonly cy: SVGAnimatedLength;
+ readonly r: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGCircleElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGCircleElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGCircleElement: {
+ prototype: SVGCircleElement;
+ new(): SVGCircleElement;
+};
+
+/** Provides access to the properties of <clipPath> elements, as well as methods to manipulate them. */
+interface SVGClipPathElement extends SVGElement {
+ readonly clipPathUnits: SVGAnimatedEnumeration;
+ readonly transform: SVGAnimatedTransformList;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGClipPathElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGClipPathElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGClipPathElement: {
+ prototype: SVGClipPathElement;
+ new(): SVGClipPathElement;
+};
+
+/** A base interface used by the component transfer function interfaces. */
+interface SVGComponentTransferFunctionElement extends SVGElement {
+ readonly amplitude: SVGAnimatedNumber;
+ readonly exponent: SVGAnimatedNumber;
+ readonly intercept: SVGAnimatedNumber;
+ readonly offset: SVGAnimatedNumber;
+ readonly slope: SVGAnimatedNumber;
+ readonly tableValues: SVGAnimatedNumberList;
+ readonly type: SVGAnimatedEnumeration;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_GAMMA: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_LINEAR: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_TABLE: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGComponentTransferFunctionElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGComponentTransferFunctionElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGComponentTransferFunctionElement: {
+ prototype: SVGComponentTransferFunctionElement;
+ new(): SVGComponentTransferFunctionElement;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_GAMMA: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_LINEAR: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_TABLE: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN: number;
+};
+
+interface SVGCursorElement extends SVGElement {
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGCursorElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGCursorElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGCursorElement: {
+ prototype: SVGCursorElement;
+ new(): SVGCursorElement;
+};
+
+/** Corresponds to the <defs> element. */
+interface SVGDefsElement extends SVGGraphicsElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGDefsElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGDefsElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGDefsElement: {
+ prototype: SVGDefsElement;
+ new(): SVGDefsElement;
+};
+
+/** Corresponds to the <desc> element. */
+interface SVGDescElement extends SVGElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGDescElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGDescElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGDescElement: {
+ prototype: SVGDescElement;
+ new(): SVGDescElement;
+};
+
+interface SVGElementEventMap extends ElementEventMap, GlobalEventHandlersEventMap, DocumentAndElementEventHandlersEventMap {
+}
+
+/** All of the SVG DOM interfaces that correspond directly to elements in the SVG language derive from the SVGElement interface. */
+interface SVGElement extends Element, DocumentAndElementEventHandlers, DocumentAndElementEventHandlers, ElementCSSInlineStyle, GlobalEventHandlers, GlobalEventHandlers, HTMLOrSVGElement, SVGElementInstance {
+ /** @deprecated */
+ readonly className: any;
+ readonly ownerSVGElement: SVGSVGElement | null;
+ readonly viewportElement: SVGElement | null;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGElement: {
+ prototype: SVGElement;
+ new(): SVGElement;
+};
+
+interface SVGElementInstance extends EventTarget {
+ readonly correspondingElement: SVGElement;
+ readonly correspondingUseElement: SVGUseElement;
+}
+
+declare var SVGElementInstance: {
+ prototype: SVGElementInstance;
+ new(): SVGElementInstance;
+};
+
+interface SVGElementInstanceList {
+ /** @deprecated */
+ readonly length: number;
+ /** @deprecated */
+ item(index: number): SVGElementInstance;
+}
+
+declare var SVGElementInstanceList: {
+ prototype: SVGElementInstanceList;
+ new(): SVGElementInstanceList;
+};
+
+/** Provides access to the properties of <ellipse> elements. */
+interface SVGEllipseElement extends SVGGeometryElement {
+ readonly cx: SVGAnimatedLength;
+ readonly cy: SVGAnimatedLength;
+ readonly rx: SVGAnimatedLength;
+ readonly ry: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGEllipseElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGEllipseElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGEllipseElement: {
+ prototype: SVGEllipseElement;
+ new(): SVGEllipseElement;
+};
+
+/** Corresponds to the <feBlend> element. */
+interface SVGFEBlendElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ readonly in2: SVGAnimatedString;
+ readonly mode: SVGAnimatedEnumeration;
+ readonly SVG_FEBLEND_MODE_COLOR: number;
+ readonly SVG_FEBLEND_MODE_COLOR_BURN: number;
+ readonly SVG_FEBLEND_MODE_COLOR_DODGE: number;
+ readonly SVG_FEBLEND_MODE_DARKEN: number;
+ readonly SVG_FEBLEND_MODE_DIFFERENCE: number;
+ readonly SVG_FEBLEND_MODE_EXCLUSION: number;
+ readonly SVG_FEBLEND_MODE_HARD_LIGHT: number;
+ readonly SVG_FEBLEND_MODE_HUE: number;
+ readonly SVG_FEBLEND_MODE_LIGHTEN: number;
+ readonly SVG_FEBLEND_MODE_LUMINOSITY: number;
+ readonly SVG_FEBLEND_MODE_MULTIPLY: number;
+ readonly SVG_FEBLEND_MODE_NORMAL: number;
+ readonly SVG_FEBLEND_MODE_OVERLAY: number;
+ readonly SVG_FEBLEND_MODE_SATURATION: number;
+ readonly SVG_FEBLEND_MODE_SCREEN: number;
+ readonly SVG_FEBLEND_MODE_SOFT_LIGHT: number;
+ readonly SVG_FEBLEND_MODE_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEBlendElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEBlendElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFEBlendElement: {
+ prototype: SVGFEBlendElement;
+ new(): SVGFEBlendElement;
+ readonly SVG_FEBLEND_MODE_COLOR: number;
+ readonly SVG_FEBLEND_MODE_COLOR_BURN: number;
+ readonly SVG_FEBLEND_MODE_COLOR_DODGE: number;
+ readonly SVG_FEBLEND_MODE_DARKEN: number;
+ readonly SVG_FEBLEND_MODE_DIFFERENCE: number;
+ readonly SVG_FEBLEND_MODE_EXCLUSION: number;
+ readonly SVG_FEBLEND_MODE_HARD_LIGHT: number;
+ readonly SVG_FEBLEND_MODE_HUE: number;
+ readonly SVG_FEBLEND_MODE_LIGHTEN: number;
+ readonly SVG_FEBLEND_MODE_LUMINOSITY: number;
+ readonly SVG_FEBLEND_MODE_MULTIPLY: number;
+ readonly SVG_FEBLEND_MODE_NORMAL: number;
+ readonly SVG_FEBLEND_MODE_OVERLAY: number;
+ readonly SVG_FEBLEND_MODE_SATURATION: number;
+ readonly SVG_FEBLEND_MODE_SCREEN: number;
+ readonly SVG_FEBLEND_MODE_SOFT_LIGHT: number;
+ readonly SVG_FEBLEND_MODE_UNKNOWN: number;
+};
+
+/** Corresponds to the <feColorMatrix> element. */
+interface SVGFEColorMatrixElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ readonly type: SVGAnimatedEnumeration;
+ readonly values: SVGAnimatedNumberList;
+ readonly SVG_FECOLORMATRIX_TYPE_HUEROTATE: number;
+ readonly SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA: number;
+ readonly SVG_FECOLORMATRIX_TYPE_MATRIX: number;
+ readonly SVG_FECOLORMATRIX_TYPE_SATURATE: number;
+ readonly SVG_FECOLORMATRIX_TYPE_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEColorMatrixElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEColorMatrixElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFEColorMatrixElement: {
+ prototype: SVGFEColorMatrixElement;
+ new(): SVGFEColorMatrixElement;
+ readonly SVG_FECOLORMATRIX_TYPE_HUEROTATE: number;
+ readonly SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA: number;
+ readonly SVG_FECOLORMATRIX_TYPE_MATRIX: number;
+ readonly SVG_FECOLORMATRIX_TYPE_SATURATE: number;
+ readonly SVG_FECOLORMATRIX_TYPE_UNKNOWN: number;
+};
+
+/** Corresponds to the <feComponentTransfer> element. */
+interface SVGFEComponentTransferElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEComponentTransferElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEComponentTransferElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFEComponentTransferElement: {
+ prototype: SVGFEComponentTransferElement;
+ new(): SVGFEComponentTransferElement;
+};
+
+/** Corresponds to the <feComposite> element. */
+interface SVGFECompositeElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ readonly in2: SVGAnimatedString;
+ readonly k1: SVGAnimatedNumber;
+ readonly k2: SVGAnimatedNumber;
+ readonly k3: SVGAnimatedNumber;
+ readonly k4: SVGAnimatedNumber;
+ readonly operator: SVGAnimatedEnumeration;
+ readonly SVG_FECOMPOSITE_OPERATOR_ARITHMETIC: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_ATOP: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_IN: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_OUT: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_OVER: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_UNKNOWN: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_XOR: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFECompositeElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFECompositeElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFECompositeElement: {
+ prototype: SVGFECompositeElement;
+ new(): SVGFECompositeElement;
+ readonly SVG_FECOMPOSITE_OPERATOR_ARITHMETIC: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_ATOP: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_IN: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_OUT: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_OVER: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_UNKNOWN: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_XOR: number;
+};
+
+/** Corresponds to the <feConvolveMatrix> element. */
+interface SVGFEConvolveMatrixElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly bias: SVGAnimatedNumber;
+ readonly divisor: SVGAnimatedNumber;
+ readonly edgeMode: SVGAnimatedEnumeration;
+ readonly in1: SVGAnimatedString;
+ readonly kernelMatrix: SVGAnimatedNumberList;
+ readonly kernelUnitLengthX: SVGAnimatedNumber;
+ readonly kernelUnitLengthY: SVGAnimatedNumber;
+ readonly orderX: SVGAnimatedInteger;
+ readonly orderY: SVGAnimatedInteger;
+ readonly preserveAlpha: SVGAnimatedBoolean;
+ readonly targetX: SVGAnimatedInteger;
+ readonly targetY: SVGAnimatedInteger;
+ readonly SVG_EDGEMODE_DUPLICATE: number;
+ readonly SVG_EDGEMODE_NONE: number;
+ readonly SVG_EDGEMODE_UNKNOWN: number;
+ readonly SVG_EDGEMODE_WRAP: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEConvolveMatrixElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEConvolveMatrixElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFEConvolveMatrixElement: {
+ prototype: SVGFEConvolveMatrixElement;
+ new(): SVGFEConvolveMatrixElement;
+ readonly SVG_EDGEMODE_DUPLICATE: number;
+ readonly SVG_EDGEMODE_NONE: number;
+ readonly SVG_EDGEMODE_UNKNOWN: number;
+ readonly SVG_EDGEMODE_WRAP: number;
+};
+
+/** Corresponds to the <feDiffuseLighting> element. */
+interface SVGFEDiffuseLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly diffuseConstant: SVGAnimatedNumber;
+ readonly in1: SVGAnimatedString;
+ readonly kernelUnitLengthX: SVGAnimatedNumber;
+ readonly kernelUnitLengthY: SVGAnimatedNumber;
+ readonly surfaceScale: SVGAnimatedNumber;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEDiffuseLightingElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEDiffuseLightingElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFEDiffuseLightingElement: {
+ prototype: SVGFEDiffuseLightingElement;
+ new(): SVGFEDiffuseLightingElement;
+};
+
+/** Corresponds to the <feDisplacementMap> element. */
+interface SVGFEDisplacementMapElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ readonly in2: SVGAnimatedString;
+ readonly scale: SVGAnimatedNumber;
+ readonly xChannelSelector: SVGAnimatedEnumeration;
+ readonly yChannelSelector: SVGAnimatedEnumeration;
+ readonly SVG_CHANNEL_A: number;
+ readonly SVG_CHANNEL_B: number;
+ readonly SVG_CHANNEL_G: number;
+ readonly SVG_CHANNEL_R: number;
+ readonly SVG_CHANNEL_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEDisplacementMapElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEDisplacementMapElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFEDisplacementMapElement: {
+ prototype: SVGFEDisplacementMapElement;
+ new(): SVGFEDisplacementMapElement;
+ readonly SVG_CHANNEL_A: number;
+ readonly SVG_CHANNEL_B: number;
+ readonly SVG_CHANNEL_G: number;
+ readonly SVG_CHANNEL_R: number;
+ readonly SVG_CHANNEL_UNKNOWN: number;
+};
+
+/** Corresponds to the <feDistantLight> element. */
+interface SVGFEDistantLightElement extends SVGElement {
+ readonly azimuth: SVGAnimatedNumber;
+ readonly elevation: SVGAnimatedNumber;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEDistantLightElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEDistantLightElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFEDistantLightElement: {
+ prototype: SVGFEDistantLightElement;
+ new(): SVGFEDistantLightElement;
+};
+
+interface SVGFEDropShadowElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly dx: SVGAnimatedNumber;
+ readonly dy: SVGAnimatedNumber;
+ readonly in1: SVGAnimatedString;
+ readonly stdDeviationX: SVGAnimatedNumber;
+ readonly stdDeviationY: SVGAnimatedNumber;
+ setStdDeviation(stdDeviationX: number, stdDeviationY: number): void;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEDropShadowElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEDropShadowElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFEDropShadowElement: {
+ prototype: SVGFEDropShadowElement;
+ new(): SVGFEDropShadowElement;
+};
+
+/** Corresponds to the <feFlood> element. */
+interface SVGFEFloodElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEFloodElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEFloodElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFEFloodElement: {
+ prototype: SVGFEFloodElement;
+ new(): SVGFEFloodElement;
+};
+
+/** Corresponds to the <feFuncA> element. */
+interface SVGFEFuncAElement extends SVGComponentTransferFunctionElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEFuncAElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEFuncAElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFEFuncAElement: {
+ prototype: SVGFEFuncAElement;
+ new(): SVGFEFuncAElement;
+};
+
+/** Corresponds to the <feFuncB> element. */
+interface SVGFEFuncBElement extends SVGComponentTransferFunctionElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEFuncBElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEFuncBElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFEFuncBElement: {
+ prototype: SVGFEFuncBElement;
+ new(): SVGFEFuncBElement;
+};
+
+/** Corresponds to the <feFuncG> element. */
+interface SVGFEFuncGElement extends SVGComponentTransferFunctionElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEFuncGElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEFuncGElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFEFuncGElement: {
+ prototype: SVGFEFuncGElement;
+ new(): SVGFEFuncGElement;
+};
+
+/** Corresponds to the <feFuncR> element. */
+interface SVGFEFuncRElement extends SVGComponentTransferFunctionElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEFuncRElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEFuncRElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFEFuncRElement: {
+ prototype: SVGFEFuncRElement;
+ new(): SVGFEFuncRElement;
+};
+
+/** Corresponds to the <feGaussianBlur> element. */
+interface SVGFEGaussianBlurElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ readonly stdDeviationX: SVGAnimatedNumber;
+ readonly stdDeviationY: SVGAnimatedNumber;
+ setStdDeviation(stdDeviationX: number, stdDeviationY: number): void;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEGaussianBlurElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEGaussianBlurElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFEGaussianBlurElement: {
+ prototype: SVGFEGaussianBlurElement;
+ new(): SVGFEGaussianBlurElement;
+};
+
+/** Corresponds to the <feImage> element. */
+interface SVGFEImageElement extends SVGElement, SVGFilterPrimitiveStandardAttributes, SVGURIReference {
+ readonly preserveAspectRatio: SVGAnimatedPreserveAspectRatio;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEImageElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEImageElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFEImageElement: {
+ prototype: SVGFEImageElement;
+ new(): SVGFEImageElement;
+};
+
+/** Corresponds to the <feMerge> element. */
+interface SVGFEMergeElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEMergeElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEMergeElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFEMergeElement: {
+ prototype: SVGFEMergeElement;
+ new(): SVGFEMergeElement;
+};
+
+/** Corresponds to the <feMergeNode> element. */
+interface SVGFEMergeNodeElement extends SVGElement {
+ readonly in1: SVGAnimatedString;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEMergeNodeElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEMergeNodeElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFEMergeNodeElement: {
+ prototype: SVGFEMergeNodeElement;
+ new(): SVGFEMergeNodeElement;
+};
+
+/** Corresponds to the <feMorphology> element. */
+interface SVGFEMorphologyElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ readonly operator: SVGAnimatedEnumeration;
+ readonly radiusX: SVGAnimatedNumber;
+ readonly radiusY: SVGAnimatedNumber;
+ readonly SVG_MORPHOLOGY_OPERATOR_DILATE: number;
+ readonly SVG_MORPHOLOGY_OPERATOR_ERODE: number;
+ readonly SVG_MORPHOLOGY_OPERATOR_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEMorphologyElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEMorphologyElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFEMorphologyElement: {
+ prototype: SVGFEMorphologyElement;
+ new(): SVGFEMorphologyElement;
+ readonly SVG_MORPHOLOGY_OPERATOR_DILATE: number;
+ readonly SVG_MORPHOLOGY_OPERATOR_ERODE: number;
+ readonly SVG_MORPHOLOGY_OPERATOR_UNKNOWN: number;
+};
+
+/** Corresponds to the <feOffset> element. */
+interface SVGFEOffsetElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly dx: SVGAnimatedNumber;
+ readonly dy: SVGAnimatedNumber;
+ readonly in1: SVGAnimatedString;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEOffsetElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEOffsetElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFEOffsetElement: {
+ prototype: SVGFEOffsetElement;
+ new(): SVGFEOffsetElement;
+};
+
+/** Corresponds to the <fePointLight> element. */
+interface SVGFEPointLightElement extends SVGElement {
+ readonly x: SVGAnimatedNumber;
+ readonly y: SVGAnimatedNumber;
+ readonly z: SVGAnimatedNumber;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEPointLightElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFEPointLightElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFEPointLightElement: {
+ prototype: SVGFEPointLightElement;
+ new(): SVGFEPointLightElement;
+};
+
+/** Corresponds to the <feSpecularLighting> element. */
+interface SVGFESpecularLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ readonly kernelUnitLengthX: SVGAnimatedNumber;
+ readonly kernelUnitLengthY: SVGAnimatedNumber;
+ readonly specularConstant: SVGAnimatedNumber;
+ readonly specularExponent: SVGAnimatedNumber;
+ readonly surfaceScale: SVGAnimatedNumber;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFESpecularLightingElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFESpecularLightingElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFESpecularLightingElement: {
+ prototype: SVGFESpecularLightingElement;
+ new(): SVGFESpecularLightingElement;
+};
+
+/** Corresponds to the <feSpotLight> element. */
+interface SVGFESpotLightElement extends SVGElement {
+ readonly limitingConeAngle: SVGAnimatedNumber;
+ readonly pointsAtX: SVGAnimatedNumber;
+ readonly pointsAtY: SVGAnimatedNumber;
+ readonly pointsAtZ: SVGAnimatedNumber;
+ readonly specularExponent: SVGAnimatedNumber;
+ readonly x: SVGAnimatedNumber;
+ readonly y: SVGAnimatedNumber;
+ readonly z: SVGAnimatedNumber;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFESpotLightElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFESpotLightElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFESpotLightElement: {
+ prototype: SVGFESpotLightElement;
+ new(): SVGFESpotLightElement;
+};
+
+/** Corresponds to the <feTile> element. */
+interface SVGFETileElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly in1: SVGAnimatedString;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFETileElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFETileElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFETileElement: {
+ prototype: SVGFETileElement;
+ new(): SVGFETileElement;
+};
+
+/** Corresponds to the <feTurbulence> element. */
+interface SVGFETurbulenceElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
+ readonly baseFrequencyX: SVGAnimatedNumber;
+ readonly baseFrequencyY: SVGAnimatedNumber;
+ readonly numOctaves: SVGAnimatedInteger;
+ readonly seed: SVGAnimatedNumber;
+ readonly stitchTiles: SVGAnimatedEnumeration;
+ readonly type: SVGAnimatedEnumeration;
+ readonly SVG_STITCHTYPE_NOSTITCH: number;
+ readonly SVG_STITCHTYPE_STITCH: number;
+ readonly SVG_STITCHTYPE_UNKNOWN: number;
+ readonly SVG_TURBULENCE_TYPE_FRACTALNOISE: number;
+ readonly SVG_TURBULENCE_TYPE_TURBULENCE: number;
+ readonly SVG_TURBULENCE_TYPE_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFETurbulenceElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFETurbulenceElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFETurbulenceElement: {
+ prototype: SVGFETurbulenceElement;
+ new(): SVGFETurbulenceElement;
+ readonly SVG_STITCHTYPE_NOSTITCH: number;
+ readonly SVG_STITCHTYPE_STITCH: number;
+ readonly SVG_STITCHTYPE_UNKNOWN: number;
+ readonly SVG_TURBULENCE_TYPE_FRACTALNOISE: number;
+ readonly SVG_TURBULENCE_TYPE_TURBULENCE: number;
+ readonly SVG_TURBULENCE_TYPE_UNKNOWN: number;
+};
+
+/** Provides access to the properties of <filter> elements, as well as methods to manipulate them. */
+interface SVGFilterElement extends SVGElement, SVGURIReference {
+ readonly filterUnits: SVGAnimatedEnumeration;
+ readonly height: SVGAnimatedLength;
+ readonly primitiveUnits: SVGAnimatedEnumeration;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFilterElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGFilterElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGFilterElement: {
+ prototype: SVGFilterElement;
+ new(): SVGFilterElement;
+};
+
+interface SVGFilterPrimitiveStandardAttributes {
+ readonly height: SVGAnimatedLength;
+ readonly result: SVGAnimatedString;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+}
+
+interface SVGFitToViewBox {
+ readonly preserveAspectRatio: SVGAnimatedPreserveAspectRatio;
+ readonly viewBox: SVGAnimatedRect;
+}
+
+/** Provides access to the properties of <foreignObject> elements, as well as methods to manipulate them. */
+interface SVGForeignObjectElement extends SVGGraphicsElement {
+ readonly height: SVGAnimatedLength;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGForeignObjectElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGForeignObjectElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGForeignObjectElement: {
+ prototype: SVGForeignObjectElement;
+ new(): SVGForeignObjectElement;
+};
+
+/** Corresponds to the <g> element. */
+interface SVGGElement extends SVGGraphicsElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGGElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGGElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGGElement: {
+ prototype: SVGGElement;
+ new(): SVGGElement;
+};
+
+interface SVGGeometryElement extends SVGGraphicsElement {
+ readonly pathLength: SVGAnimatedNumber;
+ getPointAtLength(distance: number): DOMPoint;
+ getTotalLength(): number;
+ isPointInFill(point?: DOMPointInit): boolean;
+ isPointInStroke(point?: DOMPointInit): boolean;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGGeometryElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGGeometryElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGGeometryElement: {
+ prototype: SVGGeometryElement;
+ new(): SVGGeometryElement;
+};
+
+/** The SVGGradient interface is a base interface used by SVGLinearGradientElement and SVGRadialGradientElement. */
+interface SVGGradientElement extends SVGElement, SVGURIReference {
+ readonly gradientTransform: SVGAnimatedTransformList;
+ readonly gradientUnits: SVGAnimatedEnumeration;
+ readonly spreadMethod: SVGAnimatedEnumeration;
+ readonly SVG_SPREADMETHOD_PAD: number;
+ readonly SVG_SPREADMETHOD_REFLECT: number;
+ readonly SVG_SPREADMETHOD_REPEAT: number;
+ readonly SVG_SPREADMETHOD_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGGradientElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGGradientElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGGradientElement: {
+ prototype: SVGGradientElement;
+ new(): SVGGradientElement;
+ readonly SVG_SPREADMETHOD_PAD: number;
+ readonly SVG_SPREADMETHOD_REFLECT: number;
+ readonly SVG_SPREADMETHOD_REPEAT: number;
+ readonly SVG_SPREADMETHOD_UNKNOWN: number;
+};
+
+/** SVG elements whose primary purpose is to directly render graphics into a group. */
+interface SVGGraphicsElement extends SVGElement, SVGTests {
+ readonly transform: SVGAnimatedTransformList;
+ getBBox(options?: SVGBoundingBoxOptions): DOMRect;
+ getCTM(): DOMMatrix | null;
+ getScreenCTM(): DOMMatrix | null;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGGraphicsElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGGraphicsElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGGraphicsElement: {
+ prototype: SVGGraphicsElement;
+ new(): SVGGraphicsElement;
+};
+
+/** Corresponds to the <image> element. */
+interface SVGImageElement extends SVGGraphicsElement, SVGURIReference {
+ readonly height: SVGAnimatedLength;
+ readonly preserveAspectRatio: SVGAnimatedPreserveAspectRatio;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGImageElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGImageElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGImageElement: {
+ prototype: SVGImageElement;
+ new(): SVGImageElement;
+};
+
+/** Correspond to the <length> basic data type. */
+interface SVGLength {
+ readonly unitType: number;
+ value: number;
+ valueAsString: string;
+ valueInSpecifiedUnits: number;
+ convertToSpecifiedUnits(unitType: number): void;
+ newValueSpecifiedUnits(unitType: number, valueInSpecifiedUnits: number): void;
+ readonly SVG_LENGTHTYPE_CM: number;
+ readonly SVG_LENGTHTYPE_EMS: number;
+ readonly SVG_LENGTHTYPE_EXS: number;
+ readonly SVG_LENGTHTYPE_IN: number;
+ readonly SVG_LENGTHTYPE_MM: number;
+ readonly SVG_LENGTHTYPE_NUMBER: number;
+ readonly SVG_LENGTHTYPE_PC: number;
+ readonly SVG_LENGTHTYPE_PERCENTAGE: number;
+ readonly SVG_LENGTHTYPE_PT: number;
+ readonly SVG_LENGTHTYPE_PX: number;
+ readonly SVG_LENGTHTYPE_UNKNOWN: number;
+}
+
+declare var SVGLength: {
+ prototype: SVGLength;
+ new(): SVGLength;
+ readonly SVG_LENGTHTYPE_CM: number;
+ readonly SVG_LENGTHTYPE_EMS: number;
+ readonly SVG_LENGTHTYPE_EXS: number;
+ readonly SVG_LENGTHTYPE_IN: number;
+ readonly SVG_LENGTHTYPE_MM: number;
+ readonly SVG_LENGTHTYPE_NUMBER: number;
+ readonly SVG_LENGTHTYPE_PC: number;
+ readonly SVG_LENGTHTYPE_PERCENTAGE: number;
+ readonly SVG_LENGTHTYPE_PT: number;
+ readonly SVG_LENGTHTYPE_PX: number;
+ readonly SVG_LENGTHTYPE_UNKNOWN: number;
+};
+
+/** The SVGLengthList defines a list of SVGLength objects. */
+interface SVGLengthList {
+ readonly length: number;
+ readonly numberOfItems: number;
+ appendItem(newItem: SVGLength): SVGLength;
+ clear(): void;
+ getItem(index: number): SVGLength;
+ initialize(newItem: SVGLength): SVGLength;
+ insertItemBefore(newItem: SVGLength, index: number): SVGLength;
+ removeItem(index: number): SVGLength;
+ replaceItem(newItem: SVGLength, index: number): SVGLength;
+ [index: number]: SVGLength;
+}
+
+declare var SVGLengthList: {
+ prototype: SVGLengthList;
+ new(): SVGLengthList;
+};
+
+/** Provides access to the properties of <line> elements, as well as methods to manipulate them. */
+interface SVGLineElement extends SVGGeometryElement {
+ readonly x1: SVGAnimatedLength;
+ readonly x2: SVGAnimatedLength;
+ readonly y1: SVGAnimatedLength;
+ readonly y2: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGLineElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGLineElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGLineElement: {
+ prototype: SVGLineElement;
+ new(): SVGLineElement;
+};
+
+/** Corresponds to the <linearGradient> element. */
+interface SVGLinearGradientElement extends SVGGradientElement {
+ readonly x1: SVGAnimatedLength;
+ readonly x2: SVGAnimatedLength;
+ readonly y1: SVGAnimatedLength;
+ readonly y2: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGLinearGradientElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGLinearGradientElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGLinearGradientElement: {
+ prototype: SVGLinearGradientElement;
+ new(): SVGLinearGradientElement;
+};
+
+interface SVGMarkerElement extends SVGElement, SVGFitToViewBox {
+ readonly markerHeight: SVGAnimatedLength;
+ readonly markerUnits: SVGAnimatedEnumeration;
+ readonly markerWidth: SVGAnimatedLength;
+ readonly orientAngle: SVGAnimatedAngle;
+ readonly orientType: SVGAnimatedEnumeration;
+ readonly refX: SVGAnimatedLength;
+ readonly refY: SVGAnimatedLength;
+ setOrientToAngle(angle: SVGAngle): void;
+ setOrientToAuto(): void;
+ readonly SVG_MARKERUNITS_STROKEWIDTH: number;
+ readonly SVG_MARKERUNITS_UNKNOWN: number;
+ readonly SVG_MARKERUNITS_USERSPACEONUSE: number;
+ readonly SVG_MARKER_ORIENT_ANGLE: number;
+ readonly SVG_MARKER_ORIENT_AUTO: number;
+ readonly SVG_MARKER_ORIENT_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGMarkerElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGMarkerElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGMarkerElement: {
+ prototype: SVGMarkerElement;
+ new(): SVGMarkerElement;
+ readonly SVG_MARKERUNITS_STROKEWIDTH: number;
+ readonly SVG_MARKERUNITS_UNKNOWN: number;
+ readonly SVG_MARKERUNITS_USERSPACEONUSE: number;
+ readonly SVG_MARKER_ORIENT_ANGLE: number;
+ readonly SVG_MARKER_ORIENT_AUTO: number;
+ readonly SVG_MARKER_ORIENT_UNKNOWN: number;
+};
+
+/** Provides access to the properties of <mask> elements, as well as methods to manipulate them. */
+interface SVGMaskElement extends SVGElement {
+ readonly height: SVGAnimatedLength;
+ readonly maskContentUnits: SVGAnimatedEnumeration;
+ readonly maskUnits: SVGAnimatedEnumeration;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGMaskElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGMaskElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGMaskElement: {
+ prototype: SVGMaskElement;
+ new(): SVGMaskElement;
+};
+
+/** Corresponds to the <metadata> element. */
+interface SVGMetadataElement extends SVGElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGMetadataElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGMetadataElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGMetadataElement: {
+ prototype: SVGMetadataElement;
+ new(): SVGMetadataElement;
+};
+
+/** Corresponds to the <number> basic data type. */
+interface SVGNumber {
+ value: number;
+}
+
+declare var SVGNumber: {
+ prototype: SVGNumber;
+ new(): SVGNumber;
+};
+
+/** The SVGNumberList defines a list of SVGNumber objects. */
+interface SVGNumberList {
+ readonly length: number;
+ readonly numberOfItems: number;
+ appendItem(newItem: SVGNumber): SVGNumber;
+ clear(): void;
+ getItem(index: number): SVGNumber;
+ initialize(newItem: SVGNumber): SVGNumber;
+ insertItemBefore(newItem: SVGNumber, index: number): SVGNumber;
+ removeItem(index: number): SVGNumber;
+ replaceItem(newItem: SVGNumber, index: number): SVGNumber;
+ [index: number]: SVGNumber;
+}
+
+declare var SVGNumberList: {
+ prototype: SVGNumberList;
+ new(): SVGNumberList;
+};
+
+/** Corresponds to the <path> element. */
+interface SVGPathElement extends SVGGraphicsElement {
+ /** @deprecated */
+ readonly pathSegList: SVGPathSegList;
+ /** @deprecated */
+ createSVGPathSegArcAbs(x: number, y: number, r1: number, r2: number, angle: number, largeArcFlag: boolean, sweepFlag: boolean): SVGPathSegArcAbs;
+ /** @deprecated */
+ createSVGPathSegArcRel(x: number, y: number, r1: number, r2: number, angle: number, largeArcFlag: boolean, sweepFlag: boolean): SVGPathSegArcRel;
+ /** @deprecated */
+ createSVGPathSegClosePath(): SVGPathSegClosePath;
+ /** @deprecated */
+ createSVGPathSegCurvetoCubicAbs(x: number, y: number, x1: number, y1: number, x2: number, y2: number): SVGPathSegCurvetoCubicAbs;
+ /** @deprecated */
+ createSVGPathSegCurvetoCubicRel(x: number, y: number, x1: number, y1: number, x2: number, y2: number): SVGPathSegCurvetoCubicRel;
+ /** @deprecated */
+ createSVGPathSegCurvetoCubicSmoothAbs(x: number, y: number, x2: number, y2: number): SVGPathSegCurvetoCubicSmoothAbs;
+ /** @deprecated */
+ createSVGPathSegCurvetoCubicSmoothRel(x: number, y: number, x2: number, y2: number): SVGPathSegCurvetoCubicSmoothRel;
+ /** @deprecated */
+ createSVGPathSegCurvetoQuadraticAbs(x: number, y: number, x1: number, y1: number): SVGPathSegCurvetoQuadraticAbs;
+ /** @deprecated */
+ createSVGPathSegCurvetoQuadraticRel(x: number, y: number, x1: number, y1: number): SVGPathSegCurvetoQuadraticRel;
+ /** @deprecated */
+ createSVGPathSegCurvetoQuadraticSmoothAbs(x: number, y: number): SVGPathSegCurvetoQuadraticSmoothAbs;
+ /** @deprecated */
+ createSVGPathSegCurvetoQuadraticSmoothRel(x: number, y: number): SVGPathSegCurvetoQuadraticSmoothRel;
+ /** @deprecated */
+ createSVGPathSegLinetoAbs(x: number, y: number): SVGPathSegLinetoAbs;
+ /** @deprecated */
+ createSVGPathSegLinetoHorizontalAbs(x: number): SVGPathSegLinetoHorizontalAbs;
+ /** @deprecated */
+ createSVGPathSegLinetoHorizontalRel(x: number): SVGPathSegLinetoHorizontalRel;
+ /** @deprecated */
+ createSVGPathSegLinetoRel(x: number, y: number): SVGPathSegLinetoRel;
+ /** @deprecated */
+ createSVGPathSegLinetoVerticalAbs(y: number): SVGPathSegLinetoVerticalAbs;
+ /** @deprecated */
+ createSVGPathSegLinetoVerticalRel(y: number): SVGPathSegLinetoVerticalRel;
+ /** @deprecated */
+ createSVGPathSegMovetoAbs(x: number, y: number): SVGPathSegMovetoAbs;
+ /** @deprecated */
+ createSVGPathSegMovetoRel(x: number, y: number): SVGPathSegMovetoRel;
+ /** @deprecated */
+ getPathSegAtLength(distance: number): number;
+ getPointAtLength(distance: number): SVGPoint;
+ getTotalLength(): number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGPathElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGPathElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGPathElement: {
+ prototype: SVGPathElement;
+ new(): SVGPathElement;
+};
+
+interface SVGPathSeg {
+ readonly pathSegType: number;
+ readonly pathSegTypeAsLetter: string;
+ readonly PATHSEG_ARC_ABS: number;
+ readonly PATHSEG_ARC_REL: number;
+ readonly PATHSEG_CLOSEPATH: number;
+ readonly PATHSEG_CURVETO_CUBIC_ABS: number;
+ readonly PATHSEG_CURVETO_CUBIC_REL: number;
+ readonly PATHSEG_CURVETO_CUBIC_SMOOTH_ABS: number;
+ readonly PATHSEG_CURVETO_CUBIC_SMOOTH_REL: number;
+ readonly PATHSEG_CURVETO_QUADRATIC_ABS: number;
+ readonly PATHSEG_CURVETO_QUADRATIC_REL: number;
+ readonly PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS: number;
+ readonly PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL: number;
+ readonly PATHSEG_LINETO_ABS: number;
+ readonly PATHSEG_LINETO_HORIZONTAL_ABS: number;
+ readonly PATHSEG_LINETO_HORIZONTAL_REL: number;
+ readonly PATHSEG_LINETO_REL: number;
+ readonly PATHSEG_LINETO_VERTICAL_ABS: number;
+ readonly PATHSEG_LINETO_VERTICAL_REL: number;
+ readonly PATHSEG_MOVETO_ABS: number;
+ readonly PATHSEG_MOVETO_REL: number;
+ readonly PATHSEG_UNKNOWN: number;
+}
+
+declare var SVGPathSeg: {
+ prototype: SVGPathSeg;
+ new(): SVGPathSeg;
+ readonly PATHSEG_ARC_ABS: number;
+ readonly PATHSEG_ARC_REL: number;
+ readonly PATHSEG_CLOSEPATH: number;
+ readonly PATHSEG_CURVETO_CUBIC_ABS: number;
+ readonly PATHSEG_CURVETO_CUBIC_REL: number;
+ readonly PATHSEG_CURVETO_CUBIC_SMOOTH_ABS: number;
+ readonly PATHSEG_CURVETO_CUBIC_SMOOTH_REL: number;
+ readonly PATHSEG_CURVETO_QUADRATIC_ABS: number;
+ readonly PATHSEG_CURVETO_QUADRATIC_REL: number;
+ readonly PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS: number;
+ readonly PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL: number;
+ readonly PATHSEG_LINETO_ABS: number;
+ readonly PATHSEG_LINETO_HORIZONTAL_ABS: number;
+ readonly PATHSEG_LINETO_HORIZONTAL_REL: number;
+ readonly PATHSEG_LINETO_REL: number;
+ readonly PATHSEG_LINETO_VERTICAL_ABS: number;
+ readonly PATHSEG_LINETO_VERTICAL_REL: number;
+ readonly PATHSEG_MOVETO_ABS: number;
+ readonly PATHSEG_MOVETO_REL: number;
+ readonly PATHSEG_UNKNOWN: number;
+};
+
+interface SVGPathSegArcAbs extends SVGPathSeg {
+ angle: number;
+ largeArcFlag: boolean;
+ r1: number;
+ r2: number;
+ sweepFlag: boolean;
+ x: number;
+ y: number;
+}
+
+declare var SVGPathSegArcAbs: {
+ prototype: SVGPathSegArcAbs;
+ new(): SVGPathSegArcAbs;
+};
+
+interface SVGPathSegArcRel extends SVGPathSeg {
+ angle: number;
+ largeArcFlag: boolean;
+ r1: number;
+ r2: number;
+ sweepFlag: boolean;
+ x: number;
+ y: number;
+}
+
+declare var SVGPathSegArcRel: {
+ prototype: SVGPathSegArcRel;
+ new(): SVGPathSegArcRel;
+};
+
+interface SVGPathSegClosePath extends SVGPathSeg {
+}
+
+declare var SVGPathSegClosePath: {
+ prototype: SVGPathSegClosePath;
+ new(): SVGPathSegClosePath;
+};
+
+interface SVGPathSegCurvetoCubicAbs extends SVGPathSeg {
+ x: number;
+ x1: number;
+ x2: number;
+ y: number;
+ y1: number;
+ y2: number;
+}
+
+declare var SVGPathSegCurvetoCubicAbs: {
+ prototype: SVGPathSegCurvetoCubicAbs;
+ new(): SVGPathSegCurvetoCubicAbs;
+};
+
+interface SVGPathSegCurvetoCubicRel extends SVGPathSeg {
+ x: number;
+ x1: number;
+ x2: number;
+ y: number;
+ y1: number;
+ y2: number;
+}
+
+declare var SVGPathSegCurvetoCubicRel: {
+ prototype: SVGPathSegCurvetoCubicRel;
+ new(): SVGPathSegCurvetoCubicRel;
+};
+
+interface SVGPathSegCurvetoCubicSmoothAbs extends SVGPathSeg {
+ x: number;
+ x2: number;
+ y: number;
+ y2: number;
+}
+
+declare var SVGPathSegCurvetoCubicSmoothAbs: {
+ prototype: SVGPathSegCurvetoCubicSmoothAbs;
+ new(): SVGPathSegCurvetoCubicSmoothAbs;
+};
+
+interface SVGPathSegCurvetoCubicSmoothRel extends SVGPathSeg {
+ x: number;
+ x2: number;
+ y: number;
+ y2: number;
+}
+
+declare var SVGPathSegCurvetoCubicSmoothRel: {
+ prototype: SVGPathSegCurvetoCubicSmoothRel;
+ new(): SVGPathSegCurvetoCubicSmoothRel;
+};
+
+interface SVGPathSegCurvetoQuadraticAbs extends SVGPathSeg {
+ x: number;
+ x1: number;
+ y: number;
+ y1: number;
+}
+
+declare var SVGPathSegCurvetoQuadraticAbs: {
+ prototype: SVGPathSegCurvetoQuadraticAbs;
+ new(): SVGPathSegCurvetoQuadraticAbs;
+};
+
+interface SVGPathSegCurvetoQuadraticRel extends SVGPathSeg {
+ x: number;
+ x1: number;
+ y: number;
+ y1: number;
+}
+
+declare var SVGPathSegCurvetoQuadraticRel: {
+ prototype: SVGPathSegCurvetoQuadraticRel;
+ new(): SVGPathSegCurvetoQuadraticRel;
+};
+
+interface SVGPathSegCurvetoQuadraticSmoothAbs extends SVGPathSeg {
+ x: number;
+ y: number;
+}
+
+declare var SVGPathSegCurvetoQuadraticSmoothAbs: {
+ prototype: SVGPathSegCurvetoQuadraticSmoothAbs;
+ new(): SVGPathSegCurvetoQuadraticSmoothAbs;
+};
+
+interface SVGPathSegCurvetoQuadraticSmoothRel extends SVGPathSeg {
+ x: number;
+ y: number;
+}
+
+declare var SVGPathSegCurvetoQuadraticSmoothRel: {
+ prototype: SVGPathSegCurvetoQuadraticSmoothRel;
+ new(): SVGPathSegCurvetoQuadraticSmoothRel;
+};
+
+interface SVGPathSegLinetoAbs extends SVGPathSeg {
+ x: number;
+ y: number;
+}
+
+declare var SVGPathSegLinetoAbs: {
+ prototype: SVGPathSegLinetoAbs;
+ new(): SVGPathSegLinetoAbs;
+};
+
+interface SVGPathSegLinetoHorizontalAbs extends SVGPathSeg {
+ x: number;
+}
+
+declare var SVGPathSegLinetoHorizontalAbs: {
+ prototype: SVGPathSegLinetoHorizontalAbs;
+ new(): SVGPathSegLinetoHorizontalAbs;
+};
+
+interface SVGPathSegLinetoHorizontalRel extends SVGPathSeg {
+ x: number;
+}
+
+declare var SVGPathSegLinetoHorizontalRel: {
+ prototype: SVGPathSegLinetoHorizontalRel;
+ new(): SVGPathSegLinetoHorizontalRel;
+};
+
+interface SVGPathSegLinetoRel extends SVGPathSeg {
+ x: number;
+ y: number;
+}
+
+declare var SVGPathSegLinetoRel: {
+ prototype: SVGPathSegLinetoRel;
+ new(): SVGPathSegLinetoRel;
+};
+
+interface SVGPathSegLinetoVerticalAbs extends SVGPathSeg {
+ y: number;
+}
+
+declare var SVGPathSegLinetoVerticalAbs: {
+ prototype: SVGPathSegLinetoVerticalAbs;
+ new(): SVGPathSegLinetoVerticalAbs;
+};
+
+interface SVGPathSegLinetoVerticalRel extends SVGPathSeg {
+ y: number;
+}
+
+declare var SVGPathSegLinetoVerticalRel: {
+ prototype: SVGPathSegLinetoVerticalRel;
+ new(): SVGPathSegLinetoVerticalRel;
+};
+
+interface SVGPathSegList {
+ readonly numberOfItems: number;
+ appendItem(newItem: SVGPathSeg): SVGPathSeg;
+ clear(): void;
+ getItem(index: number): SVGPathSeg;
+ initialize(newItem: SVGPathSeg): SVGPathSeg;
+ insertItemBefore(newItem: SVGPathSeg, index: number): SVGPathSeg;
+ removeItem(index: number): SVGPathSeg;
+ replaceItem(newItem: SVGPathSeg, index: number): SVGPathSeg;
+}
+
+declare var SVGPathSegList: {
+ prototype: SVGPathSegList;
+ new(): SVGPathSegList;
+};
+
+interface SVGPathSegMovetoAbs extends SVGPathSeg {
+ x: number;
+ y: number;
+}
+
+declare var SVGPathSegMovetoAbs: {
+ prototype: SVGPathSegMovetoAbs;
+ new(): SVGPathSegMovetoAbs;
+};
+
+interface SVGPathSegMovetoRel extends SVGPathSeg {
+ x: number;
+ y: number;
+}
+
+declare var SVGPathSegMovetoRel: {
+ prototype: SVGPathSegMovetoRel;
+ new(): SVGPathSegMovetoRel;
+};
+
+/** Corresponds to the <pattern> element. */
+interface SVGPatternElement extends SVGElement, SVGFitToViewBox, SVGURIReference {
+ readonly height: SVGAnimatedLength;
+ readonly patternContentUnits: SVGAnimatedEnumeration;
+ readonly patternTransform: SVGAnimatedTransformList;
+ readonly patternUnits: SVGAnimatedEnumeration;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGPatternElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGPatternElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGPatternElement: {
+ prototype: SVGPatternElement;
+ new(): SVGPatternElement;
+};
+
+interface SVGPointList {
+ readonly length: number;
+ readonly numberOfItems: number;
+ appendItem(newItem: DOMPoint): DOMPoint;
+ clear(): void;
+ getItem(index: number): DOMPoint;
+ initialize(newItem: DOMPoint): DOMPoint;
+ insertItemBefore(newItem: DOMPoint, index: number): DOMPoint;
+ removeItem(index: number): DOMPoint;
+ replaceItem(newItem: DOMPoint, index: number): DOMPoint;
+ [index: number]: DOMPoint;
+}
+
+declare var SVGPointList: {
+ prototype: SVGPointList;
+ new(): SVGPointList;
+};
+
+/** Provides access to the properties of <polygon> elements, as well as methods to manipulate them. */
+interface SVGPolygonElement extends SVGGeometryElement, SVGAnimatedPoints {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGPolygonElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGPolygonElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGPolygonElement: {
+ prototype: SVGPolygonElement;
+ new(): SVGPolygonElement;
+};
+
+/** Provides access to the properties of <polyline> elements, as well as methods to manipulate them. */
+interface SVGPolylineElement extends SVGGeometryElement, SVGAnimatedPoints {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGPolylineElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGPolylineElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGPolylineElement: {
+ prototype: SVGPolylineElement;
+ new(): SVGPolylineElement;
+};
+
+/** Corresponds to the preserveAspectRatio attribute, which is available for some of SVG's elements. */
+interface SVGPreserveAspectRatio {
+ align: number;
+ meetOrSlice: number;
+ readonly SVG_MEETORSLICE_MEET: number;
+ readonly SVG_MEETORSLICE_SLICE: number;
+ readonly SVG_MEETORSLICE_UNKNOWN: number;
+ readonly SVG_PRESERVEASPECTRATIO_NONE: number;
+ readonly SVG_PRESERVEASPECTRATIO_UNKNOWN: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMAXYMAX: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMAXYMID: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMAXYMIN: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMIDYMAX: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMIDYMID: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMIDYMIN: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMINYMAX: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMINYMID: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMINYMIN: number;
+}
+
+declare var SVGPreserveAspectRatio: {
+ prototype: SVGPreserveAspectRatio;
+ new(): SVGPreserveAspectRatio;
+ readonly SVG_MEETORSLICE_MEET: number;
+ readonly SVG_MEETORSLICE_SLICE: number;
+ readonly SVG_MEETORSLICE_UNKNOWN: number;
+ readonly SVG_PRESERVEASPECTRATIO_NONE: number;
+ readonly SVG_PRESERVEASPECTRATIO_UNKNOWN: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMAXYMAX: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMAXYMID: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMAXYMIN: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMIDYMAX: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMIDYMID: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMIDYMIN: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMINYMAX: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMINYMID: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMINYMIN: number;
+};
+
+/** Corresponds to the <RadialGradient> element. */
+interface SVGRadialGradientElement extends SVGGradientElement {
+ readonly cx: SVGAnimatedLength;
+ readonly cy: SVGAnimatedLength;
+ readonly fr: SVGAnimatedLength;
+ readonly fx: SVGAnimatedLength;
+ readonly fy: SVGAnimatedLength;
+ readonly r: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGRadialGradientElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGRadialGradientElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGRadialGradientElement: {
+ prototype: SVGRadialGradientElement;
+ new(): SVGRadialGradientElement;
+};
+
+/** Provides access to the properties of <rect> elements, as well as methods to manipulate them. */
+interface SVGRectElement extends SVGGeometryElement {
+ readonly height: SVGAnimatedLength;
+ readonly rx: SVGAnimatedLength;
+ readonly ry: SVGAnimatedLength;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGRectElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGRectElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGRectElement: {
+ prototype: SVGRectElement;
+ new(): SVGRectElement;
+};
+
+interface SVGSVGElementEventMap extends SVGElementEventMap {
+ "SVGUnload": Event;
+ "SVGZoom": SVGZoomEvent;
+}
+
+/** Provides access to the properties of <svg> elements, as well as methods to manipulate them. This interface contains also various miscellaneous commonly-used utility methods, such as matrix operations and the ability to control the time of redraw on visual rendering devices. */
+interface SVGSVGElement extends SVGGraphicsElement, DocumentEvent, SVGFitToViewBox, SVGZoomAndPan {
+ /** @deprecated */
+ contentScriptType: string;
+ /** @deprecated */
+ contentStyleType: string;
+ currentScale: number;
+ readonly currentTranslate: SVGPoint;
+ readonly height: SVGAnimatedLength;
+ onunload: ((this: SVGSVGElement, ev: Event) => any) | null;
+ onzoom: ((this: SVGSVGElement, ev: SVGZoomEvent) => any) | null;
+ /** @deprecated */
+ readonly pixelUnitToMillimeterX: number;
+ /** @deprecated */
+ readonly pixelUnitToMillimeterY: number;
+ /** @deprecated */
+ readonly screenPixelToMillimeterX: number;
+ /** @deprecated */
+ readonly screenPixelToMillimeterY: number;
+ /** @deprecated */
+ readonly viewport: SVGRect;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+ animationsPaused(): boolean;
+ checkEnclosure(element: SVGElement, rect: SVGRect): boolean;
+ checkIntersection(element: SVGElement, rect: SVGRect): boolean;
+ createSVGAngle(): SVGAngle;
+ createSVGLength(): SVGLength;
+ createSVGMatrix(): SVGMatrix;
+ createSVGNumber(): SVGNumber;
+ createSVGPoint(): SVGPoint;
+ createSVGRect(): SVGRect;
+ createSVGTransform(): SVGTransform;
+ createSVGTransformFromMatrix(matrix: SVGMatrix): SVGTransform;
+ deselectAll(): void;
+ /** @deprecated */
+ forceRedraw(): void;
+ getComputedStyle(elt: Element, pseudoElt?: string | null): CSSStyleDeclaration;
+ getCurrentTime(): number;
+ getElementById(elementId: string): Element;
+ getEnclosureList(rect: SVGRect, referenceElement: SVGElement): NodeListOf<SVGCircleElement | SVGEllipseElement | SVGImageElement | SVGLineElement | SVGPathElement | SVGPolygonElement | SVGPolylineElement | SVGRectElement | SVGTextElement | SVGUseElement>;
+ getIntersectionList(rect: SVGRect, referenceElement: SVGElement): NodeListOf<SVGCircleElement | SVGEllipseElement | SVGImageElement | SVGLineElement | SVGPathElement | SVGPolygonElement | SVGPolylineElement | SVGRectElement | SVGTextElement | SVGUseElement>;
+ pauseAnimations(): void;
+ setCurrentTime(seconds: number): void;
+ /** @deprecated */
+ suspendRedraw(maxWaitMilliseconds: number): number;
+ unpauseAnimations(): void;
+ /** @deprecated */
+ unsuspendRedraw(suspendHandleID: number): void;
+ /** @deprecated */
+ unsuspendRedrawAll(): void;
+ addEventListener<K extends keyof SVGSVGElementEventMap>(type: K, listener: (this: SVGSVGElement, ev: SVGSVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGSVGElementEventMap>(type: K, listener: (this: SVGSVGElement, ev: SVGSVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGSVGElement: {
+ prototype: SVGSVGElement;
+ new(): SVGSVGElement;
+ readonly SVG_ZOOMANDPAN_DISABLE: number;
+ readonly SVG_ZOOMANDPAN_MAGNIFY: number;
+ readonly SVG_ZOOMANDPAN_UNKNOWN: number;
+};
+
+/** Corresponds to the SVG <script> element. */
+interface SVGScriptElement extends SVGElement, SVGURIReference {
+ type: string;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGScriptElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGScriptElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGScriptElement: {
+ prototype: SVGScriptElement;
+ new(): SVGScriptElement;
+};
+
+/** Corresponds to the <stop> element. */
+interface SVGStopElement extends SVGElement {
+ readonly offset: SVGAnimatedNumber;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGStopElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGStopElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGStopElement: {
+ prototype: SVGStopElement;
+ new(): SVGStopElement;
+};
+
+/** The SVGStringList defines a list of DOMString objects. */
+interface SVGStringList {
+ readonly length: number;
+ readonly numberOfItems: number;
+ appendItem(newItem: string): string;
+ clear(): void;
+ getItem(index: number): string;
+ initialize(newItem: string): string;
+ insertItemBefore(newItem: string, index: number): string;
+ removeItem(index: number): string;
+ replaceItem(newItem: string, index: number): string;
+ [index: number]: string;
+}
+
+declare var SVGStringList: {
+ prototype: SVGStringList;
+ new(): SVGStringList;
+};
+
+/** Corresponds to the SVG <style> element. */
+interface SVGStyleElement extends SVGElement {
+ disabled: boolean;
+ media: string;
+ title: string;
+ type: string;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGStyleElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGStyleElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGStyleElement: {
+ prototype: SVGStyleElement;
+ new(): SVGStyleElement;
+};
+
+/** Corresponds to the <switch> element. */
+interface SVGSwitchElement extends SVGGraphicsElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGSwitchElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGSwitchElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGSwitchElement: {
+ prototype: SVGSwitchElement;
+ new(): SVGSwitchElement;
+};
+
+/** Corresponds to the <symbol> element. */
+interface SVGSymbolElement extends SVGElement, SVGFitToViewBox {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGSymbolElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGSymbolElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGSymbolElement: {
+ prototype: SVGSymbolElement;
+ new(): SVGSymbolElement;
+};
+
+/** A <tspan> element. */
+interface SVGTSpanElement extends SVGTextPositioningElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGTSpanElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGTSpanElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGTSpanElement: {
+ prototype: SVGTSpanElement;
+ new(): SVGTSpanElement;
+};
+
+interface SVGTests {
+ readonly requiredExtensions: SVGStringList;
+ readonly systemLanguage: SVGStringList;
+}
+
+/** Implemented by elements that support rendering child text content. It is inherited by various text-related interfaces, such as SVGTextElement, SVGTSpanElement, SVGTRefElement, SVGAltGlyphElement and SVGTextPathElement. */
+interface SVGTextContentElement extends SVGGraphicsElement {
+ readonly lengthAdjust: SVGAnimatedEnumeration;
+ readonly textLength: SVGAnimatedLength;
+ getCharNumAtPosition(point?: DOMPointInit): number;
+ getComputedTextLength(): number;
+ getEndPositionOfChar(charnum: number): DOMPoint;
+ getExtentOfChar(charnum: number): DOMRect;
+ getNumberOfChars(): number;
+ getRotationOfChar(charnum: number): number;
+ getStartPositionOfChar(charnum: number): DOMPoint;
+ getSubStringLength(charnum: number, nchars: number): number;
+ selectSubString(charnum: number, nchars: number): void;
+ readonly LENGTHADJUST_SPACING: number;
+ readonly LENGTHADJUST_SPACINGANDGLYPHS: number;
+ readonly LENGTHADJUST_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGTextContentElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGTextContentElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGTextContentElement: {
+ prototype: SVGTextContentElement;
+ new(): SVGTextContentElement;
+ readonly LENGTHADJUST_SPACING: number;
+ readonly LENGTHADJUST_SPACINGANDGLYPHS: number;
+ readonly LENGTHADJUST_UNKNOWN: number;
+};
+
+/** Corresponds to the <text> elements. */
+interface SVGTextElement extends SVGTextPositioningElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGTextElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGTextElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGTextElement: {
+ prototype: SVGTextElement;
+ new(): SVGTextElement;
+};
+
+/** Corresponds to the <textPath> element. */
+interface SVGTextPathElement extends SVGTextContentElement, SVGURIReference {
+ readonly method: SVGAnimatedEnumeration;
+ readonly spacing: SVGAnimatedEnumeration;
+ readonly startOffset: SVGAnimatedLength;
+ readonly TEXTPATH_METHODTYPE_ALIGN: number;
+ readonly TEXTPATH_METHODTYPE_STRETCH: number;
+ readonly TEXTPATH_METHODTYPE_UNKNOWN: number;
+ readonly TEXTPATH_SPACINGTYPE_AUTO: number;
+ readonly TEXTPATH_SPACINGTYPE_EXACT: number;
+ readonly TEXTPATH_SPACINGTYPE_UNKNOWN: number;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGTextPathElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGTextPathElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGTextPathElement: {
+ prototype: SVGTextPathElement;
+ new(): SVGTextPathElement;
+ readonly TEXTPATH_METHODTYPE_ALIGN: number;
+ readonly TEXTPATH_METHODTYPE_STRETCH: number;
+ readonly TEXTPATH_METHODTYPE_UNKNOWN: number;
+ readonly TEXTPATH_SPACINGTYPE_AUTO: number;
+ readonly TEXTPATH_SPACINGTYPE_EXACT: number;
+ readonly TEXTPATH_SPACINGTYPE_UNKNOWN: number;
+};
+
+/** Implemented by elements that support attributes that position individual text glyphs. It is inherited by SVGTextElement, SVGTSpanElement, SVGTRefElement and SVGAltGlyphElement. */
+interface SVGTextPositioningElement extends SVGTextContentElement {
+ readonly dx: SVGAnimatedLengthList;
+ readonly dy: SVGAnimatedLengthList;
+ readonly rotate: SVGAnimatedNumberList;
+ readonly x: SVGAnimatedLengthList;
+ readonly y: SVGAnimatedLengthList;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGTextPositioningElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGTextPositioningElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGTextPositioningElement: {
+ prototype: SVGTextPositioningElement;
+ new(): SVGTextPositioningElement;
+};
+
+/** Corresponds to the <title> element. */
+interface SVGTitleElement extends SVGElement {
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGTitleElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGTitleElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGTitleElement: {
+ prototype: SVGTitleElement;
+ new(): SVGTitleElement;
+};
+
+/** SVGTransform is the interface for one of the component transformations within an SVGTransformList; thus, an SVGTransform object corresponds to a single component (e.g., scale(…) or matrix(…)) within a transform attribute. */
+interface SVGTransform {
+ readonly angle: number;
+ readonly matrix: SVGMatrix;
+ readonly type: number;
+ setMatrix(matrix: SVGMatrix): void;
+ setRotate(angle: number, cx: number, cy: number): void;
+ setScale(sx: number, sy: number): void;
+ setSkewX(angle: number): void;
+ setSkewY(angle: number): void;
+ setTranslate(tx: number, ty: number): void;
+ readonly SVG_TRANSFORM_MATRIX: number;
+ readonly SVG_TRANSFORM_ROTATE: number;
+ readonly SVG_TRANSFORM_SCALE: number;
+ readonly SVG_TRANSFORM_SKEWX: number;
+ readonly SVG_TRANSFORM_SKEWY: number;
+ readonly SVG_TRANSFORM_TRANSLATE: number;
+ readonly SVG_TRANSFORM_UNKNOWN: number;
+}
+
+declare var SVGTransform: {
+ prototype: SVGTransform;
+ new(): SVGTransform;
+ readonly SVG_TRANSFORM_MATRIX: number;
+ readonly SVG_TRANSFORM_ROTATE: number;
+ readonly SVG_TRANSFORM_SCALE: number;
+ readonly SVG_TRANSFORM_SKEWX: number;
+ readonly SVG_TRANSFORM_SKEWY: number;
+ readonly SVG_TRANSFORM_TRANSLATE: number;
+ readonly SVG_TRANSFORM_UNKNOWN: number;
+};
+
+/** The SVGTransformList defines a list of SVGTransform objects. */
+interface SVGTransformList {
+ readonly numberOfItems: number;
+ appendItem(newItem: SVGTransform): SVGTransform;
+ clear(): void;
+ consolidate(): SVGTransform;
+ createSVGTransformFromMatrix(matrix: SVGMatrix): SVGTransform;
+ getItem(index: number): SVGTransform;
+ initialize(newItem: SVGTransform): SVGTransform;
+ insertItemBefore(newItem: SVGTransform, index: number): SVGTransform;
+ removeItem(index: number): SVGTransform;
+ replaceItem(newItem: SVGTransform, index: number): SVGTransform;
+}
+
+declare var SVGTransformList: {
+ prototype: SVGTransformList;
+ new(): SVGTransformList;
+};
+
+interface SVGURIReference {
+ readonly href: SVGAnimatedString;
+}
+
+/** A commonly used set of constants used for reflecting gradientUnits, patternContentUnits and other similar attributes. */
+interface SVGUnitTypes {
+ readonly SVG_UNIT_TYPE_OBJECTBOUNDINGBOX: number;
+ readonly SVG_UNIT_TYPE_UNKNOWN: number;
+ readonly SVG_UNIT_TYPE_USERSPACEONUSE: number;
+}
+
+declare var SVGUnitTypes: {
+ prototype: SVGUnitTypes;
+ new(): SVGUnitTypes;
+ readonly SVG_UNIT_TYPE_OBJECTBOUNDINGBOX: number;
+ readonly SVG_UNIT_TYPE_UNKNOWN: number;
+ readonly SVG_UNIT_TYPE_USERSPACEONUSE: number;
+};
+
+/** Corresponds to the <use> element. */
+interface SVGUseElement extends SVGGraphicsElement, SVGURIReference {
+ readonly animatedInstanceRoot: SVGElementInstance | null;
+ readonly height: SVGAnimatedLength;
+ readonly instanceRoot: SVGElementInstance | null;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGUseElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGUseElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGUseElement: {
+ prototype: SVGUseElement;
+ new(): SVGUseElement;
+};
+
+/** Provides access to the properties of <view> elements, as well as methods to manipulate them. */
+interface SVGViewElement extends SVGElement, SVGFitToViewBox, SVGZoomAndPan {
+ /** @deprecated */
+ readonly viewTarget: SVGStringList;
+ addEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGViewElement, ev: SVGElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SVGElementEventMap>(type: K, listener: (this: SVGViewElement, ev: SVGElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SVGViewElement: {
+ prototype: SVGViewElement;
+ new(): SVGViewElement;
+ readonly SVG_ZOOMANDPAN_DISABLE: number;
+ readonly SVG_ZOOMANDPAN_MAGNIFY: number;
+ readonly SVG_ZOOMANDPAN_UNKNOWN: number;
+};
+
+/** Used to reflect the zoomAndPan attribute, and is mixed in to other interfaces for elements that support this attribute. */
+interface SVGZoomAndPan {
+ readonly zoomAndPan: number;
+}
+
+declare var SVGZoomAndPan: {
+ readonly SVG_ZOOMANDPAN_DISABLE: number;
+ readonly SVG_ZOOMANDPAN_MAGNIFY: number;
+ readonly SVG_ZOOMANDPAN_UNKNOWN: number;
+};
+
+interface SVGZoomEvent extends UIEvent {
+ readonly newScale: number;
+ readonly newTranslate: SVGPoint;
+ readonly previousScale: number;
+ readonly previousTranslate: SVGPoint;
+ readonly zoomRectScreen: SVGRect;
+}
+
+declare var SVGZoomEvent: {
+ prototype: SVGZoomEvent;
+ new(): SVGZoomEvent;
+};
+
+interface ScopedCredential {
+ readonly id: ArrayBuffer;
+ readonly type: ScopedCredentialType;
+}
+
+declare var ScopedCredential: {
+ prototype: ScopedCredential;
+ new(): ScopedCredential;
+};
+
+interface ScopedCredentialInfo {
+ readonly credential: ScopedCredential;
+ readonly publicKey: CryptoKey;
+}
+
+declare var ScopedCredentialInfo: {
+ prototype: ScopedCredentialInfo;
+ new(): ScopedCredentialInfo;
+};
+
+/** A screen, usually the one on which the current window is being rendered, and is obtained using window.screen. */
+interface Screen {
+ readonly availHeight: number;
+ readonly availWidth: number;
+ readonly colorDepth: number;
+ readonly height: number;
+ readonly orientation: ScreenOrientation;
+ readonly pixelDepth: number;
+ readonly width: number;
+}
+
+declare var Screen: {
+ prototype: Screen;
+ new(): Screen;
+};
+
+interface ScreenOrientationEventMap {
+ "change": Event;
+}
+
+interface ScreenOrientation extends EventTarget {
+ readonly angle: number;
+ onchange: ((this: ScreenOrientation, ev: Event) => any) | null;
+ readonly type: OrientationType;
+ lock(orientation: OrientationLockType): Promise<void>;
+ unlock(): void;
+ addEventListener<K extends keyof ScreenOrientationEventMap>(type: K, listener: (this: ScreenOrientation, ev: ScreenOrientationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof ScreenOrientationEventMap>(type: K, listener: (this: ScreenOrientation, ev: ScreenOrientationEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var ScreenOrientation: {
+ prototype: ScreenOrientation;
+ new(): ScreenOrientation;
+};
+
+interface ScriptProcessorNodeEventMap {
+ "audioprocess": AudioProcessingEvent;
+}
+
+/** Allows the generation, processing, or analyzing of audio using JavaScript. */
+interface ScriptProcessorNode extends AudioNode {
+ /** @deprecated */
+ readonly bufferSize: number;
+ /** @deprecated */
+ onaudioprocess: ((this: ScriptProcessorNode, ev: AudioProcessingEvent) => any) | null;
+ addEventListener<K extends keyof ScriptProcessorNodeEventMap>(type: K, listener: (this: ScriptProcessorNode, ev: ScriptProcessorNodeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof ScriptProcessorNodeEventMap>(type: K, listener: (this: ScriptProcessorNode, ev: ScriptProcessorNodeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var ScriptProcessorNode: {
+ prototype: ScriptProcessorNode;
+ new(): ScriptProcessorNode;
+};
+
+/** Inherits from Event, and represents the event object of an event sent on a document or worker when its content security policy is violated. */
+interface SecurityPolicyViolationEvent extends Event {
+ readonly blockedURI: string;
+ readonly columnNumber: number;
+ readonly documentURI: string;
+ readonly effectiveDirective: string;
+ readonly lineNumber: number;
+ readonly originalPolicy: string;
+ readonly referrer: string;
+ readonly sourceFile: string;
+ readonly statusCode: number;
+ readonly violatedDirective: string;
+}
+
+declare var SecurityPolicyViolationEvent: {
+ prototype: SecurityPolicyViolationEvent;
+ new(type: string, eventInitDict?: SecurityPolicyViolationEventInit): SecurityPolicyViolationEvent;
+};
+
+/** A Selection object represents the range of text selected by the user or the current position of the caret. To obtain a Selection object for examination or modification, call Window.getSelection(). */
+interface Selection {
+ readonly anchorNode: Node | null;
+ readonly anchorOffset: number;
+ readonly focusNode: Node | null;
+ readonly focusOffset: number;
+ readonly isCollapsed: boolean;
+ readonly rangeCount: number;
+ readonly type: string;
+ addRange(range: Range): void;
+ collapse(node: Node | null, offset?: number): void;
+ collapseToEnd(): void;
+ collapseToStart(): void;
+ containsNode(node: Node, allowPartialContainment?: boolean): boolean;
+ deleteFromDocument(): void;
+ empty(): void;
+ extend(node: Node, offset?: number): void;
+ getRangeAt(index: number): Range;
+ removeAllRanges(): void;
+ removeRange(range: Range): void;
+ selectAllChildren(node: Node): void;
+ setBaseAndExtent(anchorNode: Node, anchorOffset: number, focusNode: Node, focusOffset: number): void;
+ setPosition(node: Node | null, offset?: number): void;
+ toString(): string;
+}
+
+declare var Selection: {
+ prototype: Selection;
+ new(): Selection;
+ toString(): string;
+};
+
+interface ServiceUIFrameContext {
+ getCachedFrameMessage(key: string): string;
+ postFrameMessage(key: string, data: string): void;
+}
+declare var ServiceUIFrameContext: ServiceUIFrameContext;
+
+interface ServiceWorkerEventMap extends AbstractWorkerEventMap {
+ "statechange": Event;
+}
+
+/** This ServiceWorker API interface provides a reference to a service worker. Multiple browsing contexts (e.g. pages, workers, etc.) can be associated with the same service worker, each through a unique ServiceWorker object. */
+interface ServiceWorker extends EventTarget, AbstractWorker {
+ onstatechange: ((this: ServiceWorker, ev: Event) => any) | null;
+ readonly scriptURL: string;
+ readonly state: ServiceWorkerState;
+ postMessage(message: any, transfer: Transferable[]): void;
+ postMessage(message: any, options?: PostMessageOptions): void;
+ addEventListener<K extends keyof ServiceWorkerEventMap>(type: K, listener: (this: ServiceWorker, ev: ServiceWorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof ServiceWorkerEventMap>(type: K, listener: (this: ServiceWorker, ev: ServiceWorkerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var ServiceWorker: {
+ prototype: ServiceWorker;
+ new(): ServiceWorker;
+};
+
+interface ServiceWorkerContainerEventMap {
+ "controllerchange": Event;
+ "message": MessageEvent;
+ "messageerror": MessageEvent;
+}
+
+/** The ServiceWorkerContainer interface of the ServiceWorker API provides an object representing the service worker as an overall unit in the network ecosystem, including facilities to register, unregister and update service workers, and access the state of service workers and their registrations. */
+interface ServiceWorkerContainer extends EventTarget {
+ readonly controller: ServiceWorker | null;
+ oncontrollerchange: ((this: ServiceWorkerContainer, ev: Event) => any) | null;
+ onmessage: ((this: ServiceWorkerContainer, ev: MessageEvent) => any) | null;
+ onmessageerror: ((this: ServiceWorkerContainer, ev: MessageEvent) => any) | null;
+ readonly ready: Promise<ServiceWorkerRegistration>;
+ getRegistration(clientURL?: string): Promise<ServiceWorkerRegistration | undefined>;
+ getRegistrations(): Promise<ReadonlyArray<ServiceWorkerRegistration>>;
+ register(scriptURL: string, options?: RegistrationOptions): Promise<ServiceWorkerRegistration>;
+ startMessages(): void;
+ addEventListener<K extends keyof ServiceWorkerContainerEventMap>(type: K, listener: (this: ServiceWorkerContainer, ev: ServiceWorkerContainerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof ServiceWorkerContainerEventMap>(type: K, listener: (this: ServiceWorkerContainer, ev: ServiceWorkerContainerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var ServiceWorkerContainer: {
+ prototype: ServiceWorkerContainer;
+ new(): ServiceWorkerContainer;
+};
+
+/** This ServiceWorker API interface contains information about an event sent to a ServiceWorkerContainer target. This extends the default message event to allow setting a ServiceWorker object as the source of a message. The event object is accessed via the handler function of a message event, when fired by a message received from a service worker. */
+interface ServiceWorkerMessageEvent extends Event {
+ readonly data: any;
+ readonly lastEventId: string;
+ readonly origin: string;
+ readonly ports: ReadonlyArray<MessagePort> | null;
+ readonly source: ServiceWorker | MessagePort | null;
+}
+
+declare var ServiceWorkerMessageEvent: {
+ prototype: ServiceWorkerMessageEvent;
+ new(type: string, eventInitDict?: ServiceWorkerMessageEventInit): ServiceWorkerMessageEvent;
+};
+
+interface ServiceWorkerRegistrationEventMap {
+ "updatefound": Event;
+}
+
+/** This ServiceWorker API interface represents the service worker registration. You register a service worker to control one or more pages that share the same origin. */
+interface ServiceWorkerRegistration extends EventTarget {
+ readonly active: ServiceWorker | null;
+ readonly installing: ServiceWorker | null;
+ readonly navigationPreload: NavigationPreloadManager;
+ onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null;
+ readonly pushManager: PushManager;
+ readonly scope: string;
+ readonly sync: SyncManager;
+ readonly updateViaCache: ServiceWorkerUpdateViaCache;
+ readonly waiting: ServiceWorker | null;
+ getNotifications(filter?: GetNotificationOptions): Promise<Notification[]>;
+ showNotification(title: string, options?: NotificationOptions): Promise<void>;
+ unregister(): Promise<boolean>;
+ update(): Promise<void>;
+ addEventListener<K extends keyof ServiceWorkerRegistrationEventMap>(type: K, listener: (this: ServiceWorkerRegistration, ev: ServiceWorkerRegistrationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof ServiceWorkerRegistrationEventMap>(type: K, listener: (this: ServiceWorkerRegistration, ev: ServiceWorkerRegistrationEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var ServiceWorkerRegistration: {
+ prototype: ServiceWorkerRegistration;
+ new(): ServiceWorkerRegistration;
+};
+
+interface ShadowRoot extends DocumentFragment, DocumentOrShadowRoot, InnerHTML {
+ readonly host: Element;
+ readonly mode: ShadowRootMode;
+ /**
+ * Throws a "NotSupportedError" DOMException if context object is a shadow root.
+ */
+}
+
+declare var ShadowRoot: {
+ prototype: ShadowRoot;
+ new(): ShadowRoot;
+};
+
+interface SharedWorker extends EventTarget, AbstractWorker {
+ /**
+ * Returns sharedWorker's MessagePort object which can be used to communicate with the global environment.
+ */
+ readonly port: MessagePort;
+ addEventListener<K extends keyof AbstractWorkerEventMap>(type: K, listener: (this: SharedWorker, ev: AbstractWorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof AbstractWorkerEventMap>(type: K, listener: (this: SharedWorker, ev: AbstractWorkerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SharedWorker: {
+ prototype: SharedWorker;
+ new(scriptURL: string, options?: string | WorkerOptions): SharedWorker;
+};
+
+interface Slotable {
+ readonly assignedSlot: HTMLSlotElement | null;
+}
+
+interface SourceBufferEventMap {
+ "abort": Event;
+ "error": Event;
+ "update": Event;
+ "updateend": Event;
+ "updatestart": Event;
+}
+
+/** A chunk of media to be passed into an HTMLMediaElement and played, via a MediaSource object. This can be made up of one or several media segments. */
+interface SourceBuffer extends EventTarget {
+ appendWindowEnd: number;
+ appendWindowStart: number;
+ readonly buffered: TimeRanges;
+ mode: AppendMode;
+ onabort: ((this: SourceBuffer, ev: Event) => any) | null;
+ onerror: ((this: SourceBuffer, ev: Event) => any) | null;
+ onupdate: ((this: SourceBuffer, ev: Event) => any) | null;
+ onupdateend: ((this: SourceBuffer, ev: Event) => any) | null;
+ onupdatestart: ((this: SourceBuffer, ev: Event) => any) | null;
+ timestampOffset: number;
+ readonly updating: boolean;
+ abort(): void;
+ appendBuffer(data: BufferSource): void;
+ remove(start: number, end: number): void;
+ addEventListener<K extends keyof SourceBufferEventMap>(type: K, listener: (this: SourceBuffer, ev: SourceBufferEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SourceBufferEventMap>(type: K, listener: (this: SourceBuffer, ev: SourceBufferEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SourceBuffer: {
+ prototype: SourceBuffer;
+ new(): SourceBuffer;
+};
+
+interface SourceBufferListEventMap {
+ "addsourcebuffer": Event;
+ "removesourcebuffer": Event;
+}
+
+/** A simple container list for multiple SourceBuffer objects. */
+interface SourceBufferList extends EventTarget {
+ readonly length: number;
+ onaddsourcebuffer: ((this: SourceBufferList, ev: Event) => any) | null;
+ onremovesourcebuffer: ((this: SourceBufferList, ev: Event) => any) | null;
+ addEventListener<K extends keyof SourceBufferListEventMap>(type: K, listener: (this: SourceBufferList, ev: SourceBufferListEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SourceBufferListEventMap>(type: K, listener: (this: SourceBufferList, ev: SourceBufferListEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+ [index: number]: SourceBuffer;
+}
+
+declare var SourceBufferList: {
+ prototype: SourceBufferList;
+ new(): SourceBufferList;
+};
+
+interface SpeechGrammar {
+ src: string;
+ weight: number;
+}
+
+declare var SpeechGrammar: {
+ prototype: SpeechGrammar;
+ new(): SpeechGrammar;
+};
+
+interface SpeechGrammarList {
+ readonly length: number;
+ addFromString(string: string, weight?: number): void;
+ addFromURI(src: string, weight?: number): void;
+ item(index: number): SpeechGrammar;
+ [index: number]: SpeechGrammar;
+}
+
+declare var SpeechGrammarList: {
+ prototype: SpeechGrammarList;
+ new(): SpeechGrammarList;
+};
+
+interface SpeechRecognitionEventMap {
+ "audioend": Event;
+ "audiostart": Event;
+ "end": Event;
+ "error": Event;
+ "nomatch": SpeechRecognitionEvent;
+ "result": SpeechRecognitionEvent;
+ "soundend": Event;
+ "soundstart": Event;
+ "speechend": Event;
+ "speechstart": Event;
+ "start": Event;
+}
+
+interface SpeechRecognition extends EventTarget {
+ continuous: boolean;
+ grammars: SpeechGrammarList;
+ interimResults: boolean;
+ lang: string;
+ maxAlternatives: number;
+ onaudioend: ((this: SpeechRecognition, ev: Event) => any) | null;
+ onaudiostart: ((this: SpeechRecognition, ev: Event) => any) | null;
+ onend: ((this: SpeechRecognition, ev: Event) => any) | null;
+ onerror: ((this: SpeechRecognition, ev: Event) => any) | null;
+ onnomatch: ((this: SpeechRecognition, ev: SpeechRecognitionEvent) => any) | null;
+ onresult: ((this: SpeechRecognition, ev: SpeechRecognitionEvent) => any) | null;
+ onsoundend: ((this: SpeechRecognition, ev: Event) => any) | null;
+ onsoundstart: ((this: SpeechRecognition, ev: Event) => any) | null;
+ onspeechend: ((this: SpeechRecognition, ev: Event) => any) | null;
+ onspeechstart: ((this: SpeechRecognition, ev: Event) => any) | null;
+ onstart: ((this: SpeechRecognition, ev: Event) => any) | null;
+ abort(): void;
+ start(): void;
+ stop(): void;
+ addEventListener<K extends keyof SpeechRecognitionEventMap>(type: K, listener: (this: SpeechRecognition, ev: SpeechRecognitionEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SpeechRecognitionEventMap>(type: K, listener: (this: SpeechRecognition, ev: SpeechRecognitionEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SpeechRecognition: {
+ prototype: SpeechRecognition;
+ new(): SpeechRecognition;
+};
+
+interface SpeechRecognitionAlternative {
+ readonly confidence: number;
+ readonly transcript: string;
+}
+
+declare var SpeechRecognitionAlternative: {
+ prototype: SpeechRecognitionAlternative;
+ new(): SpeechRecognitionAlternative;
+};
+
+interface SpeechRecognitionEvent extends Event {
+ readonly resultIndex: number;
+ readonly results: SpeechRecognitionResultList;
+}
+
+declare var SpeechRecognitionEvent: {
+ prototype: SpeechRecognitionEvent;
+ new(): SpeechRecognitionEvent;
+};
+
+interface SpeechRecognitionResult {
+ readonly isFinal: boolean;
+ readonly length: number;
+ item(index: number): SpeechRecognitionAlternative;
+ [index: number]: SpeechRecognitionAlternative;
+}
+
+declare var SpeechRecognitionResult: {
+ prototype: SpeechRecognitionResult;
+ new(): SpeechRecognitionResult;
+};
+
+interface SpeechRecognitionResultList {
+ readonly length: number;
+ item(index: number): SpeechRecognitionResult;
+ [index: number]: SpeechRecognitionResult;
+}
+
+declare var SpeechRecognitionResultList: {
+ prototype: SpeechRecognitionResultList;
+ new(): SpeechRecognitionResultList;
+};
+
+interface SpeechSynthesisEventMap {
+ "voiceschanged": Event;
+}
+
+/** This Web Speech API interface is the controller interface for the speech service; this can be used to retrieve information about the synthesis voices available on the device, start and pause speech, and other commands besides. */
+interface SpeechSynthesis extends EventTarget {
+ onvoiceschanged: ((this: SpeechSynthesis, ev: Event) => any) | null;
+ readonly paused: boolean;
+ readonly pending: boolean;
+ readonly speaking: boolean;
+ cancel(): void;
+ getVoices(): SpeechSynthesisVoice[];
+ pause(): void;
+ resume(): void;
+ speak(utterance: SpeechSynthesisUtterance): void;
+ addEventListener<K extends keyof SpeechSynthesisEventMap>(type: K, listener: (this: SpeechSynthesis, ev: SpeechSynthesisEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SpeechSynthesisEventMap>(type: K, listener: (this: SpeechSynthesis, ev: SpeechSynthesisEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SpeechSynthesis: {
+ prototype: SpeechSynthesis;
+ new(): SpeechSynthesis;
+};
+
+interface SpeechSynthesisErrorEvent extends SpeechSynthesisEvent {
+ readonly error: SpeechSynthesisErrorCode;
+}
+
+declare var SpeechSynthesisErrorEvent: {
+ prototype: SpeechSynthesisErrorEvent;
+ new(type: string, eventInitDict: SpeechSynthesisErrorEventInit): SpeechSynthesisErrorEvent;
+};
+
+/** This Web Speech API interface contains information about the current state of SpeechSynthesisUtterance objects that have been processed in the speech service. */
+interface SpeechSynthesisEvent extends Event {
+ readonly charIndex: number;
+ readonly charLength: number;
+ readonly elapsedTime: number;
+ readonly name: string;
+ readonly utterance: SpeechSynthesisUtterance;
+}
+
+declare var SpeechSynthesisEvent: {
+ prototype: SpeechSynthesisEvent;
+ new(type: string, eventInitDict: SpeechSynthesisEventInit): SpeechSynthesisEvent;
+};
+
+interface SpeechSynthesisUtteranceEventMap {
+ "boundary": SpeechSynthesisEvent;
+ "end": SpeechSynthesisEvent;
+ "error": SpeechSynthesisErrorEvent;
+ "mark": SpeechSynthesisEvent;
+ "pause": SpeechSynthesisEvent;
+ "resume": SpeechSynthesisEvent;
+ "start": SpeechSynthesisEvent;
+}
+
+/** This Web Speech API interface represents a speech request. It contains the content the speech service should read and information about how to read it (e.g. language, pitch and volume.) */
+interface SpeechSynthesisUtterance extends EventTarget {
+ lang: string;
+ onboundary: ((this: SpeechSynthesisUtterance, ev: SpeechSynthesisEvent) => any) | null;
+ onend: ((this: SpeechSynthesisUtterance, ev: SpeechSynthesisEvent) => any) | null;
+ onerror: ((this: SpeechSynthesisUtterance, ev: SpeechSynthesisErrorEvent) => any) | null;
+ onmark: ((this: SpeechSynthesisUtterance, ev: SpeechSynthesisEvent) => any) | null;
+ onpause: ((this: SpeechSynthesisUtterance, ev: SpeechSynthesisEvent) => any) | null;
+ onresume: ((this: SpeechSynthesisUtterance, ev: SpeechSynthesisEvent) => any) | null;
+ onstart: ((this: SpeechSynthesisUtterance, ev: SpeechSynthesisEvent) => any) | null;
+ pitch: number;
+ rate: number;
+ text: string;
+ voice: SpeechSynthesisVoice | null;
+ volume: number;
+ addEventListener<K extends keyof SpeechSynthesisUtteranceEventMap>(type: K, listener: (this: SpeechSynthesisUtterance, ev: SpeechSynthesisUtteranceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SpeechSynthesisUtteranceEventMap>(type: K, listener: (this: SpeechSynthesisUtterance, ev: SpeechSynthesisUtteranceEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SpeechSynthesisUtterance: {
+ prototype: SpeechSynthesisUtterance;
+ new(text?: string): SpeechSynthesisUtterance;
+};
+
+/** This Web Speech API interface represents a voice that the system supports. Every SpeechSynthesisVoice has its own relative speech service including information about language, name and URI. */
+interface SpeechSynthesisVoice {
+ readonly default: boolean;
+ readonly lang: string;
+ readonly localService: boolean;
+ readonly name: string;
+ readonly voiceURI: string;
+}
+
+declare var SpeechSynthesisVoice: {
+ prototype: SpeechSynthesisVoice;
+ new(): SpeechSynthesisVoice;
+};
+
+interface StaticRange extends AbstractRange {
+}
+
+declare var StaticRange: {
+ prototype: StaticRange;
+ new(init: StaticRangeInit): StaticRange;
+};
+
+/** The pan property takes a unitless value between -1 (full left pan) and 1 (full right pan). This interface was introduced as a much simpler way to apply a simple panning effect than having to use a full PannerNode. */
+interface StereoPannerNode extends AudioNode {
+ readonly pan: AudioParam;
+}
+
+declare var StereoPannerNode: {
+ prototype: StereoPannerNode;
+ new(context: BaseAudioContext, options?: StereoPannerOptions): StereoPannerNode;
+};
+
+/** This Web Storage API interface provides access to a particular domain's session or local storage. It allows, for example, the addition, modification, or deletion of stored data items. */
+interface Storage {
+ /**
+ * Returns the number of key/value pairs currently present in the list associated with the object.
+ */
+ readonly length: number;
+ /**
+ * Empties the list associated with the object of all key/value pairs, if there are any.
+ */
+ clear(): void;
+ /**
+ * Returns the current value associated with the given key, or null if the given key does not exist in the list associated with the object.
+ */
+ getItem(key: string): string | null;
+ /**
+ * Returns the name of the nth key in the list, or null if n is greater than or equal to the number of key/value pairs in the object.
+ */
+ key(index: number): string | null;
+ /**
+ * Removes the key/value pair with the given key from the list associated with the object, if a key/value pair with the given key exists.
+ */
+ removeItem(key: string): void;
+ /**
+ * Sets the value of the pair identified by key to value, creating a new key/value pair if none existed for key previously.
+ *
+ * Throws a "QuotaExceededError" DOMException exception if the new value couldn't be set. (Setting could fail if, e.g., the user has disabled storage for the site, or if the quota has been exceeded.)
+ */
+ setItem(key: string, value: string): void;
+ [name: string]: any;
+}
+
+declare var Storage: {
+ prototype: Storage;
+ new(): Storage;
+};
+
+/** A StorageEvent is sent to a window when a storage area it has access to is changed within the context of another document. */
+interface StorageEvent extends Event {
+ /**
+ * Returns the key of the storage item being changed.
+ */
+ readonly key: string | null;
+ /**
+ * Returns the new value of the key of the storage item whose value is being changed.
+ */
+ readonly newValue: string | null;
+ /**
+ * Returns the old value of the key of the storage item whose value is being changed.
+ */
+ readonly oldValue: string | null;
+ /**
+ * Returns the Storage object that was affected.
+ */
+ readonly storageArea: Storage | null;
+ /**
+ * Returns the URL of the document whose storage item changed.
+ */
+ readonly url: string;
+}
+
+declare var StorageEvent: {
+ prototype: StorageEvent;
+ new(type: string, eventInitDict?: StorageEventInit): StorageEvent;
+};
+
+interface StorageManager {
+ estimate(): Promise<StorageEstimate>;
+ persist(): Promise<boolean>;
+ persisted(): Promise<boolean>;
+}
+
+declare var StorageManager: {
+ prototype: StorageManager;
+ new(): StorageManager;
+};
+
+interface StyleMedia {
+ readonly type: string;
+ matchMedium(mediaquery: string): boolean;
+}
+
+declare var StyleMedia: {
+ prototype: StyleMedia;
+ new(): StyleMedia;
+};
+
+/** A single style sheet. CSS style sheets will further implement the more specialized CSSStyleSheet interface. */
+interface StyleSheet {
+ disabled: boolean;
+ readonly href: string | null;
+ readonly media: MediaList;
+ readonly ownerNode: Element | ProcessingInstruction | null;
+ readonly parentStyleSheet: CSSStyleSheet | null;
+ readonly title: string | null;
+ readonly type: string;
+}
+
+declare var StyleSheet: {
+ prototype: StyleSheet;
+ new(): StyleSheet;
+};
+
+/** A list of StyleSheet. */
+interface StyleSheetList {
+ readonly length: number;
+ item(index: number): CSSStyleSheet | null;
+ [index: number]: CSSStyleSheet;
+}
+
+declare var StyleSheetList: {
+ prototype: StyleSheetList;
+ new(): StyleSheetList;
+};
+
+/** This Web Crypto API interface provides a number of low-level cryptographic functions. It is accessed via the Crypto.subtle properties available in a window context (via Window.crypto). */
+interface SubtleCrypto {
+ decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): PromiseLike<ArrayBuffer>;
+ deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, length: number): PromiseLike<ArrayBuffer>;
+ deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: string | AesDerivedKeyParams | HmacImportParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): PromiseLike<CryptoKey>;
+ digest(algorithm: AlgorithmIdentifier, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): PromiseLike<ArrayBuffer>;
+ encrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): PromiseLike<ArrayBuffer>;
+ exportKey(format: "jwk", key: CryptoKey): PromiseLike<JsonWebKey>;
+ exportKey(format: "raw" | "pkcs8" | "spki", key: CryptoKey): PromiseLike<ArrayBuffer>;
+ exportKey(format: string, key: CryptoKey): PromiseLike<JsonWebKey | ArrayBuffer>;
+ generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): PromiseLike<CryptoKeyPair | CryptoKey>;
+ generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams | DhKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): PromiseLike<CryptoKeyPair>;
+ generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): PromiseLike<CryptoKey>;
+ importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): PromiseLike<CryptoKey>;
+ importKey(format: "raw" | "pkcs8" | "spki", keyData: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): PromiseLike<CryptoKey>;
+ importKey(format: string, keyData: JsonWebKey | Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): PromiseLike<CryptoKey>;
+ sign(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | AesCmacParams, key: CryptoKey, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): PromiseLike<ArrayBuffer>;
+ unwrapKey(format: "raw" | "pkcs8" | "spki" | "jwk" | string, wrappedKey: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): PromiseLike<CryptoKey>;
+ verify(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | AesCmacParams, key: CryptoKey, signature: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): PromiseLike<boolean>;
+ wrapKey(format: "raw" | "pkcs8" | "spki" | "jwk" | string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams): PromiseLike<ArrayBuffer>;
+}
+
+declare var SubtleCrypto: {
+ prototype: SubtleCrypto;
+ new(): SubtleCrypto;
+};
+
+/** This ServiceWorker API interface provides an interface for registering and listing sync registrations. */
+interface SyncManager {
+ getTags(): Promise<string[]>;
+ register(tag: string): Promise<void>;
+}
+
+declare var SyncManager: {
+ prototype: SyncManager;
+ new(): SyncManager;
+};
+
+/** The textual content of Element or Attr. If an element has no markup within its content, it has a single child implementing Text that contains the element's text. However, if the element contains markup, it is parsed into information items and Text nodes that form its children. */
+interface Text extends CharacterData, Slotable {
+ readonly assignedSlot: HTMLSlotElement | null;
+ /**
+ * Returns the combined data of all direct Text node siblings.
+ */
+ readonly wholeText: string;
+ /**
+ * Splits data at the given offset and returns the remainder as Text node.
+ */
+ splitText(offset: number): Text;
+}
+
+declare var Text: {
+ prototype: Text;
+ new(data?: string): Text;
+};
+
+/** A decoder for a specific method, that is a specific character encoding, like utf-8, iso-8859-2, koi8, cp1261, gbk, etc. A decoder takes a stream of bytes as input and emits a stream of code points. For a more scalable, non-native library, see StringView – a C-like representation of strings based on typed arrays. */
+interface TextDecoder extends TextDecoderCommon {
+ /**
+ * Returns the result of running encoding's decoder. The method can be invoked zero or more times with options's stream set to true, and then once without options's stream (or set to false), to process a fragmented stream. If the invocation without options's stream (or set to false) has no input, it's clearest to omit both arguments.
+ *
+ * ```
+ * var string = "", decoder = new TextDecoder(encoding), buffer;
+ * while(buffer = next_chunk()) {
+ * string += decoder.decode(buffer, {stream:true});
+ * }
+ * string += decoder.decode(); // end-of-stream
+ * ```
+ *
+ * If the error mode is "fatal" and encoding's decoder returns error, throws a TypeError.
+ */
+ decode(input?: BufferSource, options?: TextDecodeOptions): string;
+}
+
+declare var TextDecoder: {
+ prototype: TextDecoder;
+ new(label?: string, options?: TextDecoderOptions): TextDecoder;
+};
+
+interface TextDecoderCommon {
+ /**
+ * Returns encoding's name, lowercased.
+ */
+ readonly encoding: string;
+ /**
+ * Returns true if error mode is "fatal", and false otherwise.
+ */
+ readonly fatal: boolean;
+ /**
+ * Returns true if ignore BOM flag is set, and false otherwise.
+ */
+ readonly ignoreBOM: boolean;
+}
+
+interface TextDecoderStream extends GenericTransformStream, TextDecoderCommon {
+ readonly readable: ReadableStream<string>;
+ readonly writable: WritableStream<BufferSource>;
+}
+
+declare var TextDecoderStream: {
+ prototype: TextDecoderStream;
+ new(label?: string, options?: TextDecoderOptions): TextDecoderStream;
+};
+
+/** TextEncoder takes a stream of code points as input and emits a stream of bytes. For a more scalable, non-native library, see StringView – a C-like representation of strings based on typed arrays. */
+interface TextEncoder extends TextEncoderCommon {
+ /**
+ * Returns the result of running UTF-8's encoder.
+ */
+ encode(input?: string): Uint8Array;
+ /**
+ * Runs the UTF-8 encoder on source, stores the result of that operation into destination, and returns the progress made as a dictionary whereby read is the number of converted code units of source and written is the number of bytes modified in destination.
+ */
+ encodeInto(source: string, destination: Uint8Array): TextEncoderEncodeIntoResult;
+}
+
+declare var TextEncoder: {
+ prototype: TextEncoder;
+ new(): TextEncoder;
+};
+
+interface TextEncoderCommon {
+ /**
+ * Returns "utf-8".
+ */
+ readonly encoding: string;
+}
+
+interface TextEncoderStream extends GenericTransformStream, TextEncoderCommon {
+ readonly readable: ReadableStream<Uint8Array>;
+ readonly writable: WritableStream<string>;
+}
+
+declare var TextEncoderStream: {
+ prototype: TextEncoderStream;
+ new(): TextEncoderStream;
+};
+
+interface TextEvent extends UIEvent {
+ readonly data: string;
+ initTextEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, dataArg: string, inputMethod: number, locale: string): void;
+ readonly DOM_INPUT_METHOD_DROP: number;
+ readonly DOM_INPUT_METHOD_HANDWRITING: number;
+ readonly DOM_INPUT_METHOD_IME: number;
+ readonly DOM_INPUT_METHOD_KEYBOARD: number;
+ readonly DOM_INPUT_METHOD_MULTIMODAL: number;
+ readonly DOM_INPUT_METHOD_OPTION: number;
+ readonly DOM_INPUT_METHOD_PASTE: number;
+ readonly DOM_INPUT_METHOD_SCRIPT: number;
+ readonly DOM_INPUT_METHOD_UNKNOWN: number;
+ readonly DOM_INPUT_METHOD_VOICE: number;
+}
+
+declare var TextEvent: {
+ prototype: TextEvent;
+ new(): TextEvent;
+ readonly DOM_INPUT_METHOD_DROP: number;
+ readonly DOM_INPUT_METHOD_HANDWRITING: number;
+ readonly DOM_INPUT_METHOD_IME: number;
+ readonly DOM_INPUT_METHOD_KEYBOARD: number;
+ readonly DOM_INPUT_METHOD_MULTIMODAL: number;
+ readonly DOM_INPUT_METHOD_OPTION: number;
+ readonly DOM_INPUT_METHOD_PASTE: number;
+ readonly DOM_INPUT_METHOD_SCRIPT: number;
+ readonly DOM_INPUT_METHOD_UNKNOWN: number;
+ readonly DOM_INPUT_METHOD_VOICE: number;
+};
+
+/** The dimensions of a piece of text in the canvas, as created by the CanvasRenderingContext2D.measureText() method. */
+interface TextMetrics {
+ /**
+ * Returns the measurement described below.
+ */
+ readonly actualBoundingBoxAscent: number;
+ /**
+ * Returns the measurement described below.
+ */
+ readonly actualBoundingBoxDescent: number;
+ /**
+ * Returns the measurement described below.
+ */
+ readonly actualBoundingBoxLeft: number;
+ /**
+ * Returns the measurement described below.
+ */
+ readonly actualBoundingBoxRight: number;
+ /**
+ * Returns the measurement described below.
+ */
+ readonly alphabeticBaseline: number;
+ /**
+ * Returns the measurement described below.
+ */
+ readonly emHeightAscent: number;
+ /**
+ * Returns the measurement described below.
+ */
+ readonly emHeightDescent: number;
+ /**
+ * Returns the measurement described below.
+ */
+ readonly fontBoundingBoxAscent: number;
+ /**
+ * Returns the measurement described below.
+ */
+ readonly fontBoundingBoxDescent: number;
+ /**
+ * Returns the measurement described below.
+ */
+ readonly hangingBaseline: number;
+ /**
+ * Returns the measurement described below.
+ */
+ readonly ideographicBaseline: number;
+ /**
+ * Returns the measurement described below.
+ */
+ readonly width: number;
+}
+
+declare var TextMetrics: {
+ prototype: TextMetrics;
+ new(): TextMetrics;
+};
+
+interface TextTrackEventMap {
+ "cuechange": Event;
+}
+
+/** This interface also inherits properties from EventTarget. */
+interface TextTrack extends EventTarget {
+ /**
+ * Returns the text track cues from the text track list of cues that are currently active (i.e. that start before the current playback position and end after it), as a TextTrackCueList object.
+ */
+ readonly activeCues: TextTrackCueList | null;
+ /**
+ * Returns the text track list of cues, as a TextTrackCueList object.
+ */
+ readonly cues: TextTrackCueList | null;
+ /**
+ * Returns the ID of the given track.
+ *
+ * For in-band tracks, this is the ID that can be used with a fragment if the format supports media fragment syntax, and that can be used with the getTrackById() method.
+ *
+ * For TextTrack objects corresponding to track elements, this is the ID of the track element.
+ */
+ readonly id: string;
+ /**
+ * Returns the text track in-band metadata track dispatch type string.
+ */
+ readonly inBandMetadataTrackDispatchType: string;
+ /**
+ * Returns the text track kind string.
+ */
+ readonly kind: TextTrackKind;
+ /**
+ * Returns the text track label, if there is one, or the empty string otherwise (indicating that a custom label probably needs to be generated from the other attributes of the object if the object is exposed to the user).
+ */
+ readonly label: string;
+ /**
+ * Returns the text track language string.
+ */
+ readonly language: string;
+ /**
+ * Returns the text track mode, represented by a string from the following list:
+ *
+ * Can be set, to change the mode.
+ */
+ mode: TextTrackMode;
+ oncuechange: ((this: TextTrack, ev: Event) => any) | null;
+ readonly sourceBuffer: SourceBuffer | null;
+ /**
+ * Adds the given cue to textTrack's text track list of cues.
+ */
+ addCue(cue: TextTrackCue): void;
+ /**
+ * Removes the given cue from textTrack's text track list of cues.
+ */
+ removeCue(cue: TextTrackCue): void;
+ addEventListener<K extends keyof TextTrackEventMap>(type: K, listener: (this: TextTrack, ev: TextTrackEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof TextTrackEventMap>(type: K, listener: (this: TextTrack, ev: TextTrackEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var TextTrack: {
+ prototype: TextTrack;
+ new(): TextTrack;
+};
+
+interface TextTrackCueEventMap {
+ "enter": Event;
+ "exit": Event;
+}
+
+/** TextTrackCues represent a string of text that will be displayed for some duration of time on a TextTrack. This includes the start and end times that the cue will be displayed. A TextTrackCue cannot be used directly, instead one of the derived types (e.g. VTTCue) must be used. */
+interface TextTrackCue extends EventTarget {
+ /**
+ * Returns the text track cue end time, in seconds.
+ *
+ * Can be set.
+ */
+ endTime: number;
+ /**
+ * Returns the text track cue identifier.
+ *
+ * Can be set.
+ */
+ id: string;
+ onenter: ((this: TextTrackCue, ev: Event) => any) | null;
+ onexit: ((this: TextTrackCue, ev: Event) => any) | null;
+ /**
+ * Returns true if the text track cue pause-on-exit flag is set, false otherwise.
+ *
+ * Can be set.
+ */
+ pauseOnExit: boolean;
+ /**
+ * Returns the text track cue start time, in seconds.
+ *
+ * Can be set.
+ */
+ startTime: number;
+ /**
+ * Returns the TextTrack object to which this text track cue belongs, if any, or null otherwise.
+ */
+ readonly track: TextTrack | null;
+ addEventListener<K extends keyof TextTrackCueEventMap>(type: K, listener: (this: TextTrackCue, ev: TextTrackCueEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof TextTrackCueEventMap>(type: K, listener: (this: TextTrackCue, ev: TextTrackCueEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var TextTrackCue: {
+ prototype: TextTrackCue;
+ new(): TextTrackCue;
+};
+
+interface TextTrackCueList {
+ /**
+ * Returns the number of cues in the list.
+ */
+ readonly length: number;
+ /**
+ * Returns the first text track cue (in text track cue order) with text track cue identifier id.
+ *
+ * Returns null if none of the cues have the given identifier or if the argument is the empty string.
+ */
+ getCueById(id: string): TextTrackCue | null;
+ [index: number]: TextTrackCue;
+}
+
+declare var TextTrackCueList: {
+ prototype: TextTrackCueList;
+ new(): TextTrackCueList;
+};
+
+interface TextTrackListEventMap {
+ "addtrack": TrackEvent;
+ "change": Event;
+ "removetrack": TrackEvent;
+}
+
+interface TextTrackList extends EventTarget {
+ readonly length: number;
+ onaddtrack: ((this: TextTrackList, ev: TrackEvent) => any) | null;
+ onchange: ((this: TextTrackList, ev: Event) => any) | null;
+ onremovetrack: ((this: TextTrackList, ev: TrackEvent) => any) | null;
+ getTrackById(id: string): TextTrack | null;
+ addEventListener<K extends keyof TextTrackListEventMap>(type: K, listener: (this: TextTrackList, ev: TextTrackListEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof TextTrackListEventMap>(type: K, listener: (this: TextTrackList, ev: TextTrackListEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+ [index: number]: TextTrack;
+}
+
+declare var TextTrackList: {
+ prototype: TextTrackList;
+ new(): TextTrackList;
+};
+
+/** Used to represent a set of time ranges, primarily for the purpose of tracking which portions of media have been buffered when loading it for use by the <audio> and <video> elements. */
+interface TimeRanges {
+ /**
+ * Returns the number of ranges in the object.
+ */
+ readonly length: number;
+ /**
+ * Returns the time for the end of the range with the given index.
+ *
+ * Throws an "IndexSizeError" DOMException if the index is out of range.
+ */
+ end(index: number): number;
+ /**
+ * Returns the time for the start of the range with the given index.
+ *
+ * Throws an "IndexSizeError" DOMException if the index is out of range.
+ */
+ start(index: number): number;
+}
+
+declare var TimeRanges: {
+ prototype: TimeRanges;
+ new(): TimeRanges;
+};
+
+/** A single contact point on a touch-sensitive device. The contact point is commonly a finger or stylus and the device may be a touchscreen or trackpad. */
+interface Touch {
+ readonly altitudeAngle: number;
+ readonly azimuthAngle: number;
+ readonly clientX: number;
+ readonly clientY: number;
+ readonly force: number;
+ readonly identifier: number;
+ readonly pageX: number;
+ readonly pageY: number;
+ readonly radiusX: number;
+ readonly radiusY: number;
+ readonly rotationAngle: number;
+ readonly screenX: number;
+ readonly screenY: number;
+ readonly target: EventTarget;
+ readonly touchType: TouchType;
+}
+
+declare var Touch: {
+ prototype: Touch;
+ new(touchInitDict: TouchInit): Touch;
+};
+
+/** An event sent when the state of contacts with a touch-sensitive surface changes. This surface can be a touch screen or trackpad, for example. The event can describe one or more points of contact with the screen and includes support for detecting movement, addition and removal of contact points, and so forth. */
+interface TouchEvent extends UIEvent {
+ readonly altKey: boolean;
+ readonly changedTouches: TouchList;
+ readonly ctrlKey: boolean;
+ readonly metaKey: boolean;
+ readonly shiftKey: boolean;
+ readonly targetTouches: TouchList;
+ readonly touches: TouchList;
+}
+
+declare var TouchEvent: {
+ prototype: TouchEvent;
+ new(type: string, eventInitDict?: TouchEventInit): TouchEvent;
+};
+
+/** A list of contact points on a touch surface. For example, if the user has three fingers on the touch surface (such as a screen or trackpad), the corresponding TouchList object would have one Touch object for each finger, for a total of three entries. */
+interface TouchList {
+ readonly length: number;
+ item(index: number): Touch | null;
+ [index: number]: Touch;
+}
+
+declare var TouchList: {
+ prototype: TouchList;
+ new(): TouchList;
+};
+
+/** The TrackEvent interface, part of the HTML DOM specification, is used for events which represent changes to the set of available tracks on an HTML media element; these events are addtrack and removetrack. */
+interface TrackEvent extends Event {
+ /**
+ * Returns the track object (TextTrack, AudioTrack, or VideoTrack) to which the event relates.
+ */
+ readonly track: TextTrack | null;
+}
+
+declare var TrackEvent: {
+ prototype: TrackEvent;
+ new(type: string, eventInitDict?: TrackEventInit): TrackEvent;
+};
+
+interface TransformStream<I = any, O = any> {
+ readonly readable: ReadableStream<O>;
+ readonly writable: WritableStream<I>;
+}
+
+declare var TransformStream: {
+ prototype: TransformStream;
+ new<I = any, O = any>(transformer?: Transformer<I, O>, writableStrategy?: QueuingStrategy<I>, readableStrategy?: QueuingStrategy<O>): TransformStream<I, O>;
+};
+
+interface TransformStreamDefaultController<O = any> {
+ readonly desiredSize: number | null;
+ enqueue(chunk: O): void;
+ error(reason?: any): void;
+ terminate(): void;
+}
+
+/** Events providing information related to transitions. */
+interface TransitionEvent extends Event {
+ readonly elapsedTime: number;
+ readonly propertyName: string;
+ readonly pseudoElement: string;
+}
+
+declare var TransitionEvent: {
+ prototype: TransitionEvent;
+ new(type: string, transitionEventInitDict?: TransitionEventInit): TransitionEvent;
+};
+
+/** The nodes of a document subtree and a position within them. */
+interface TreeWalker {
+ currentNode: Node;
+ readonly filter: NodeFilter | null;
+ readonly root: Node;
+ readonly whatToShow: number;
+ firstChild(): Node | null;
+ lastChild(): Node | null;
+ nextNode(): Node | null;
+ nextSibling(): Node | null;
+ parentNode(): Node | null;
+ previousNode(): Node | null;
+ previousSibling(): Node | null;
+}
+
+declare var TreeWalker: {
+ prototype: TreeWalker;
+ new(): TreeWalker;
+};
+
+/** Simple user interface events. */
+interface UIEvent extends Event {
+ readonly detail: number;
+ readonly view: Window | null;
+ /** @deprecated */
+ readonly which: number;
+}
+
+declare var UIEvent: {
+ prototype: UIEvent;
+ new(type: string, eventInitDict?: UIEventInit): UIEvent;
+};
+
+/** The URL interface represents an object providing static methods used for creating object URLs. */
+interface URL {
+ hash: string;
+ host: string;
+ hostname: string;
+ href: string;
+ toString(): string;
+ readonly origin: string;
+ password: string;
+ pathname: string;
+ port: string;
+ protocol: string;
+ search: string;
+ readonly searchParams: URLSearchParams;
+ username: string;
+ toJSON(): string;
+}
+
+declare var URL: {
+ prototype: URL;
+ new(url: string, base?: string | URL): URL;
+ createObjectURL(object: any): string;
+ revokeObjectURL(url: string): void;
+};
+
+type webkitURL = URL;
+declare var webkitURL: typeof URL;
+
+interface URLSearchParams {
+ /**
+ * Appends a specified key/value pair as a new search parameter.
+ */
+ append(name: string, value: string): void;
+ /**
+ * Deletes the given search parameter, and its associated value, from the list of all search parameters.
+ */
+ delete(name: string): void;
+ /**
+ * Returns the first value associated to the given search parameter.
+ */
+ get(name: string): string | null;
+ /**
+ * Returns all the values association with a given search parameter.
+ */
+ getAll(name: string): string[];
+ /**
+ * Returns a Boolean indicating if such a search parameter exists.
+ */
+ has(name: string): boolean;
+ /**
+ * Sets the value associated to a given search parameter to the given value. If there were several values, delete the others.
+ */
+ set(name: string, value: string): void;
+ sort(): void;
+ /**
+ * Returns a string containing a query string suitable for use in a URL. Does not include the question mark.
+ */
+ toString(): string;
+ forEach(callbackfn: (value: string, key: string, parent: URLSearchParams) => void, thisArg?: any): void;
+}
+
+declare var URLSearchParams: {
+ prototype: URLSearchParams;
+ new(init?: string[][] | Record<string, string> | string | URLSearchParams): URLSearchParams;
+ toString(): string;
+};
+
+/** This WebVR API interface represents any VR device supported by this API. It includes generic information such as device IDs and descriptions, as well as methods for starting to present a VR scene, retrieving eye parameters and display capabilities, and other important functionality. */
+interface VRDisplay extends EventTarget {
+ readonly capabilities: VRDisplayCapabilities;
+ depthFar: number;
+ depthNear: number;
+ readonly displayId: number;
+ readonly displayName: string;
+ readonly isConnected: boolean;
+ readonly isPresenting: boolean;
+ readonly stageParameters: VRStageParameters | null;
+ cancelAnimationFrame(handle: number): void;
+ exitPresent(): Promise<void>;
+ getEyeParameters(whichEye: string): VREyeParameters;
+ getFrameData(frameData: VRFrameData): boolean;
+ getLayers(): VRLayer[];
+ /** @deprecated */
+ getPose(): VRPose;
+ requestAnimationFrame(callback: FrameRequestCallback): number;
+ requestPresent(layers: VRLayer[]): Promise<void>;
+ resetPose(): void;
+ submitFrame(pose?: VRPose): void;
+}
+
+declare var VRDisplay: {
+ prototype: VRDisplay;
+ new(): VRDisplay;
+};
+
+/** This WebVR API interface describes the capabilities of a VRDisplay — its features can be used to perform VR device capability tests, for example can it return position information. */
+interface VRDisplayCapabilities {
+ readonly canPresent: boolean;
+ readonly hasExternalDisplay: boolean;
+ readonly hasOrientation: boolean;
+ readonly hasPosition: boolean;
+ readonly maxLayers: number;
+}
+
+declare var VRDisplayCapabilities: {
+ prototype: VRDisplayCapabilities;
+ new(): VRDisplayCapabilities;
+};
+
+/** This WebVR API interface represents represents the event object of WebVR-related events (see the list of WebVR window extensions). */
+interface VRDisplayEvent extends Event {
+ readonly display: VRDisplay;
+ readonly reason: VRDisplayEventReason | null;
+}
+
+declare var VRDisplayEvent: {
+ prototype: VRDisplayEvent;
+ new(type: string, eventInitDict: VRDisplayEventInit): VRDisplayEvent;
+};
+
+/** This WebVR API interface represents all the information required to correctly render a scene for a given eye, including field of view information. */
+interface VREyeParameters {
+ /** @deprecated */
+ readonly fieldOfView: VRFieldOfView;
+ readonly offset: Float32Array;
+ readonly renderHeight: number;
+ readonly renderWidth: number;
+}
+
+declare var VREyeParameters: {
+ prototype: VREyeParameters;
+ new(): VREyeParameters;
+};
+
+/** This WebVR API interface represents a field of view defined by 4 different degree values describing the view from a center point. */
+interface VRFieldOfView {
+ readonly downDegrees: number;
+ readonly leftDegrees: number;
+ readonly rightDegrees: number;
+ readonly upDegrees: number;
+}
+
+declare var VRFieldOfView: {
+ prototype: VRFieldOfView;
+ new(): VRFieldOfView;
+};
+
+/** This WebVR API interface represents all the information needed to render a single frame of a VR scene; constructed by VRDisplay.getFrameData(). */
+interface VRFrameData {
+ readonly leftProjectionMatrix: Float32Array;
+ readonly leftViewMatrix: Float32Array;
+ readonly pose: VRPose;
+ readonly rightProjectionMatrix: Float32Array;
+ readonly rightViewMatrix: Float32Array;
+ readonly timestamp: number;
+}
+
+declare var VRFrameData: {
+ prototype: VRFrameData;
+ new(): VRFrameData;
+};
+
+/** This WebVR API interface represents the state of a VR sensor at a given timestamp (which includes orientation, position, velocity, and acceleration information.) */
+interface VRPose {
+ readonly angularAcceleration: Float32Array | null;
+ readonly angularVelocity: Float32Array | null;
+ readonly linearAcceleration: Float32Array | null;
+ readonly linearVelocity: Float32Array | null;
+ readonly orientation: Float32Array | null;
+ readonly position: Float32Array | null;
+ readonly timestamp: number;
+}
+
+declare var VRPose: {
+ prototype: VRPose;
+ new(): VRPose;
+};
+
+interface VTTCue extends TextTrackCue {
+ align: AlignSetting;
+ line: LineAndPositionSetting;
+ lineAlign: LineAlignSetting;
+ position: LineAndPositionSetting;
+ positionAlign: PositionAlignSetting;
+ region: VTTRegion | null;
+ size: number;
+ snapToLines: boolean;
+ text: string;
+ vertical: DirectionSetting;
+ getCueAsHTML(): DocumentFragment;
+ addEventListener<K extends keyof TextTrackCueEventMap>(type: K, listener: (this: VTTCue, ev: TextTrackCueEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof TextTrackCueEventMap>(type: K, listener: (this: VTTCue, ev: TextTrackCueEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var VTTCue: {
+ prototype: VTTCue;
+ new(startTime: number, endTime: number, text: string): VTTCue;
+};
+
+interface VTTRegion {
+ id: string;
+ lines: number;
+ regionAnchorX: number;
+ regionAnchorY: number;
+ scroll: ScrollSetting;
+ viewportAnchorX: number;
+ viewportAnchorY: number;
+ width: number;
+}
+
+declare var VTTRegion: {
+ prototype: VTTRegion;
+ new(): VTTRegion;
+};
+
+/** The validity states that an element can be in, with respect to constraint validation. Together, they help explain why an element's value fails to validate, if it's not valid. */
+interface ValidityState {
+ readonly badInput: boolean;
+ readonly customError: boolean;
+ readonly patternMismatch: boolean;
+ readonly rangeOverflow: boolean;
+ readonly rangeUnderflow: boolean;
+ readonly stepMismatch: boolean;
+ readonly tooLong: boolean;
+ readonly tooShort: boolean;
+ readonly typeMismatch: boolean;
+ readonly valid: boolean;
+ readonly valueMissing: boolean;
+}
+
+declare var ValidityState: {
+ prototype: ValidityState;
+ new(): ValidityState;
+};
+
+/** Returned by the HTMLVideoElement.getVideoPlaybackQuality() method and contains metrics that can be used to determine the playback quality of a video. */
+interface VideoPlaybackQuality {
+ readonly creationTime: number;
+ readonly droppedVideoFrames: number;
+ readonly totalVideoFrames: number;
+}
+
+declare var VideoPlaybackQuality: {
+ prototype: VideoPlaybackQuality;
+ new(): VideoPlaybackQuality;
+};
+
+interface WEBGL_color_buffer_float {
+ readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT: GLenum;
+ readonly RGBA32F_EXT: GLenum;
+ readonly UNSIGNED_NORMALIZED_EXT: GLenum;
+}
+
+interface WEBGL_compressed_texture_astc {
+ getSupportedProfiles(): string[];
+ readonly COMPRESSED_RGBA_ASTC_10x10_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_10x5_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_10x6_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_10x8_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_12x10_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_12x12_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_4x4_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_5x4_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_5x5_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_6x5_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_6x6_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_8x5_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_8x6_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_8x8_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR: GLenum;
+}
+
+/** The WEBGL_compressed_texture_s3tc extension is part of the WebGL API and exposes four S3TC compressed texture formats. */
+interface WEBGL_compressed_texture_s3tc {
+ readonly COMPRESSED_RGBA_S3TC_DXT1_EXT: GLenum;
+ readonly COMPRESSED_RGBA_S3TC_DXT3_EXT: GLenum;
+ readonly COMPRESSED_RGBA_S3TC_DXT5_EXT: GLenum;
+ readonly COMPRESSED_RGB_S3TC_DXT1_EXT: GLenum;
+}
+
+interface WEBGL_compressed_texture_s3tc_srgb {
+ readonly COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT: GLenum;
+ readonly COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT: GLenum;
+ readonly COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT: GLenum;
+ readonly COMPRESSED_SRGB_S3TC_DXT1_EXT: GLenum;
+}
+
+/** The WEBGL_debug_renderer_info extension is part of the WebGL API and exposes two constants with information about the graphics driver for debugging purposes. */
+interface WEBGL_debug_renderer_info {
+ readonly UNMASKED_RENDERER_WEBGL: GLenum;
+ readonly UNMASKED_VENDOR_WEBGL: GLenum;
+}
+
+interface WEBGL_debug_shaders {
+ getTranslatedShaderSource(shader: WebGLShader): string;
+}
+
+/** The WEBGL_depth_texture extension is part of the WebGL API and defines 2D depth and depth-stencil textures. */
+interface WEBGL_depth_texture {
+ readonly UNSIGNED_INT_24_8_WEBGL: GLenum;
+}
+
+interface WEBGL_draw_buffers {
+ drawBuffersWEBGL(buffers: GLenum[]): void;
+ readonly COLOR_ATTACHMENT0_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT10_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT11_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT12_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT13_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT14_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT15_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT1_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT2_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT3_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT4_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT5_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT6_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT7_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT8_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT9_WEBGL: GLenum;
+ readonly DRAW_BUFFER0_WEBGL: GLenum;
+ readonly DRAW_BUFFER10_WEBGL: GLenum;
+ readonly DRAW_BUFFER11_WEBGL: GLenum;
+ readonly DRAW_BUFFER12_WEBGL: GLenum;
+ readonly DRAW_BUFFER13_WEBGL: GLenum;
+ readonly DRAW_BUFFER14_WEBGL: GLenum;
+ readonly DRAW_BUFFER15_WEBGL: GLenum;
+ readonly DRAW_BUFFER1_WEBGL: GLenum;
+ readonly DRAW_BUFFER2_WEBGL: GLenum;
+ readonly DRAW_BUFFER3_WEBGL: GLenum;
+ readonly DRAW_BUFFER4_WEBGL: GLenum;
+ readonly DRAW_BUFFER5_WEBGL: GLenum;
+ readonly DRAW_BUFFER6_WEBGL: GLenum;
+ readonly DRAW_BUFFER7_WEBGL: GLenum;
+ readonly DRAW_BUFFER8_WEBGL: GLenum;
+ readonly DRAW_BUFFER9_WEBGL: GLenum;
+ readonly MAX_COLOR_ATTACHMENTS_WEBGL: GLenum;
+ readonly MAX_DRAW_BUFFERS_WEBGL: GLenum;
+}
+
+interface WEBGL_lose_context {
+ loseContext(): void;
+ restoreContext(): void;
+}
+
+/** A WaveShaperNode always has exactly one input and one output. */
+interface WaveShaperNode extends AudioNode {
+ curve: Float32Array | null;
+ oversample: OverSampleType;
+}
+
+declare var WaveShaperNode: {
+ prototype: WaveShaperNode;
+ new(context: BaseAudioContext, options?: WaveShaperOptions): WaveShaperNode;
+};
+
+interface WebAuthentication {
+ getAssertion(assertionChallenge: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer | null, options?: AssertionOptions): Promise<WebAuthnAssertion>;
+ makeCredential(accountInformation: Account, cryptoParameters: ScopedCredentialParameters[], attestationChallenge: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer | null, options?: ScopedCredentialOptions): Promise<ScopedCredentialInfo>;
+}
+
+declare var WebAuthentication: {
+ prototype: WebAuthentication;
+ new(): WebAuthentication;
+};
+
+interface WebAuthnAssertion {
+ readonly authenticatorData: ArrayBuffer;
+ readonly clientData: ArrayBuffer;
+ readonly credential: ScopedCredential;
+ readonly signature: ArrayBuffer;
+}
+
+declare var WebAuthnAssertion: {
+ prototype: WebAuthnAssertion;
+ new(): WebAuthnAssertion;
+};
+
+interface WebGL2RenderingContext extends WebGL2RenderingContextBase, WebGL2RenderingContextOverloads, WebGLRenderingContextBase {
+}
+
+declare var WebGL2RenderingContext: {
+ prototype: WebGL2RenderingContext;
+ new(): WebGL2RenderingContext;
+ readonly ACTIVE_ATTRIBUTES: GLenum;
+ readonly ACTIVE_TEXTURE: GLenum;
+ readonly ACTIVE_UNIFORMS: GLenum;
+ readonly ALIASED_LINE_WIDTH_RANGE: GLenum;
+ readonly ALIASED_POINT_SIZE_RANGE: GLenum;
+ readonly ALPHA: GLenum;
+ readonly ALPHA_BITS: GLenum;
+ readonly ALWAYS: GLenum;
+ readonly ARRAY_BUFFER: GLenum;
+ readonly ARRAY_BUFFER_BINDING: GLenum;
+ readonly ATTACHED_SHADERS: GLenum;
+ readonly BACK: GLenum;
+ readonly BLEND: GLenum;
+ readonly BLEND_COLOR: GLenum;
+ readonly BLEND_DST_ALPHA: GLenum;
+ readonly BLEND_DST_RGB: GLenum;
+ readonly BLEND_EQUATION: GLenum;
+ readonly BLEND_EQUATION_ALPHA: GLenum;
+ readonly BLEND_EQUATION_RGB: GLenum;
+ readonly BLEND_SRC_ALPHA: GLenum;
+ readonly BLEND_SRC_RGB: GLenum;
+ readonly BLUE_BITS: GLenum;
+ readonly BOOL: GLenum;
+ readonly BOOL_VEC2: GLenum;
+ readonly BOOL_VEC3: GLenum;
+ readonly BOOL_VEC4: GLenum;
+ readonly BROWSER_DEFAULT_WEBGL: GLenum;
+ readonly BUFFER_SIZE: GLenum;
+ readonly BUFFER_USAGE: GLenum;
+ readonly BYTE: GLenum;
+ readonly CCW: GLenum;
+ readonly CLAMP_TO_EDGE: GLenum;
+ readonly COLOR_ATTACHMENT0: GLenum;
+ readonly COLOR_BUFFER_BIT: GLenum;
+ readonly COLOR_CLEAR_VALUE: GLenum;
+ readonly COLOR_WRITEMASK: GLenum;
+ readonly COMPILE_STATUS: GLenum;
+ readonly COMPRESSED_TEXTURE_FORMATS: GLenum;
+ readonly CONSTANT_ALPHA: GLenum;
+ readonly CONSTANT_COLOR: GLenum;
+ readonly CONTEXT_LOST_WEBGL: GLenum;
+ readonly CULL_FACE: GLenum;
+ readonly CULL_FACE_MODE: GLenum;
+ readonly CURRENT_PROGRAM: GLenum;
+ readonly CURRENT_VERTEX_ATTRIB: GLenum;
+ readonly CW: GLenum;
+ readonly DECR: GLenum;
+ readonly DECR_WRAP: GLenum;
+ readonly DELETE_STATUS: GLenum;
+ readonly DEPTH_ATTACHMENT: GLenum;
+ readonly DEPTH_BITS: GLenum;
+ readonly DEPTH_BUFFER_BIT: GLenum;
+ readonly DEPTH_CLEAR_VALUE: GLenum;
+ readonly DEPTH_COMPONENT: GLenum;
+ readonly DEPTH_COMPONENT16: GLenum;
+ readonly DEPTH_FUNC: GLenum;
+ readonly DEPTH_RANGE: GLenum;
+ readonly DEPTH_STENCIL: GLenum;
+ readonly DEPTH_STENCIL_ATTACHMENT: GLenum;
+ readonly DEPTH_TEST: GLenum;
+ readonly DEPTH_WRITEMASK: GLenum;
+ readonly DITHER: GLenum;
+ readonly DONT_CARE: GLenum;
+ readonly DST_ALPHA: GLenum;
+ readonly DST_COLOR: GLenum;
+ readonly DYNAMIC_DRAW: GLenum;
+ readonly ELEMENT_ARRAY_BUFFER: GLenum;
+ readonly ELEMENT_ARRAY_BUFFER_BINDING: GLenum;
+ readonly EQUAL: GLenum;
+ readonly FASTEST: GLenum;
+ readonly FLOAT: GLenum;
+ readonly FLOAT_MAT2: GLenum;
+ readonly FLOAT_MAT3: GLenum;
+ readonly FLOAT_MAT4: GLenum;
+ readonly FLOAT_VEC2: GLenum;
+ readonly FLOAT_VEC3: GLenum;
+ readonly FLOAT_VEC4: GLenum;
+ readonly FRAGMENT_SHADER: GLenum;
+ readonly FRAMEBUFFER: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: GLenum;
+ readonly FRAMEBUFFER_BINDING: GLenum;
+ readonly FRAMEBUFFER_COMPLETE: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: GLenum;
+ readonly FRAMEBUFFER_UNSUPPORTED: GLenum;
+ readonly FRONT: GLenum;
+ readonly FRONT_AND_BACK: GLenum;
+ readonly FRONT_FACE: GLenum;
+ readonly FUNC_ADD: GLenum;
+ readonly FUNC_REVERSE_SUBTRACT: GLenum;
+ readonly FUNC_SUBTRACT: GLenum;
+ readonly GENERATE_MIPMAP_HINT: GLenum;
+ readonly GEQUAL: GLenum;
+ readonly GREATER: GLenum;
+ readonly GREEN_BITS: GLenum;
+ readonly HIGH_FLOAT: GLenum;
+ readonly HIGH_INT: GLenum;
+ readonly IMPLEMENTATION_COLOR_READ_FORMAT: GLenum;
+ readonly IMPLEMENTATION_COLOR_READ_TYPE: GLenum;
+ readonly INCR: GLenum;
+ readonly INCR_WRAP: GLenum;
+ readonly INT: GLenum;
+ readonly INT_VEC2: GLenum;
+ readonly INT_VEC3: GLenum;
+ readonly INT_VEC4: GLenum;
+ readonly INVALID_ENUM: GLenum;
+ readonly INVALID_FRAMEBUFFER_OPERATION: GLenum;
+ readonly INVALID_OPERATION: GLenum;
+ readonly INVALID_VALUE: GLenum;
+ readonly INVERT: GLenum;
+ readonly KEEP: GLenum;
+ readonly LEQUAL: GLenum;
+ readonly LESS: GLenum;
+ readonly LINEAR: GLenum;
+ readonly LINEAR_MIPMAP_LINEAR: GLenum;
+ readonly LINEAR_MIPMAP_NEAREST: GLenum;
+ readonly LINES: GLenum;
+ readonly LINE_LOOP: GLenum;
+ readonly LINE_STRIP: GLenum;
+ readonly LINE_WIDTH: GLenum;
+ readonly LINK_STATUS: GLenum;
+ readonly LOW_FLOAT: GLenum;
+ readonly LOW_INT: GLenum;
+ readonly LUMINANCE: GLenum;
+ readonly LUMINANCE_ALPHA: GLenum;
+ readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: GLenum;
+ readonly MAX_CUBE_MAP_TEXTURE_SIZE: GLenum;
+ readonly MAX_FRAGMENT_UNIFORM_VECTORS: GLenum;
+ readonly MAX_RENDERBUFFER_SIZE: GLenum;
+ readonly MAX_TEXTURE_IMAGE_UNITS: GLenum;
+ readonly MAX_TEXTURE_SIZE: GLenum;
+ readonly MAX_VARYING_VECTORS: GLenum;
+ readonly MAX_VERTEX_ATTRIBS: GLenum;
+ readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: GLenum;
+ readonly MAX_VERTEX_UNIFORM_VECTORS: GLenum;
+ readonly MAX_VIEWPORT_DIMS: GLenum;
+ readonly MEDIUM_FLOAT: GLenum;
+ readonly MEDIUM_INT: GLenum;
+ readonly MIRRORED_REPEAT: GLenum;
+ readonly NEAREST: GLenum;
+ readonly NEAREST_MIPMAP_LINEAR: GLenum;
+ readonly NEAREST_MIPMAP_NEAREST: GLenum;
+ readonly NEVER: GLenum;
+ readonly NICEST: GLenum;
+ readonly NONE: GLenum;
+ readonly NOTEQUAL: GLenum;
+ readonly NO_ERROR: GLenum;
+ readonly ONE: GLenum;
+ readonly ONE_MINUS_CONSTANT_ALPHA: GLenum;
+ readonly ONE_MINUS_CONSTANT_COLOR: GLenum;
+ readonly ONE_MINUS_DST_ALPHA: GLenum;
+ readonly ONE_MINUS_DST_COLOR: GLenum;
+ readonly ONE_MINUS_SRC_ALPHA: GLenum;
+ readonly ONE_MINUS_SRC_COLOR: GLenum;
+ readonly OUT_OF_MEMORY: GLenum;
+ readonly PACK_ALIGNMENT: GLenum;
+ readonly POINTS: GLenum;
+ readonly POLYGON_OFFSET_FACTOR: GLenum;
+ readonly POLYGON_OFFSET_FILL: GLenum;
+ readonly POLYGON_OFFSET_UNITS: GLenum;
+ readonly RED_BITS: GLenum;
+ readonly RENDERBUFFER: GLenum;
+ readonly RENDERBUFFER_ALPHA_SIZE: GLenum;
+ readonly RENDERBUFFER_BINDING: GLenum;
+ readonly RENDERBUFFER_BLUE_SIZE: GLenum;
+ readonly RENDERBUFFER_DEPTH_SIZE: GLenum;
+ readonly RENDERBUFFER_GREEN_SIZE: GLenum;
+ readonly RENDERBUFFER_HEIGHT: GLenum;
+ readonly RENDERBUFFER_INTERNAL_FORMAT: GLenum;
+ readonly RENDERBUFFER_RED_SIZE: GLenum;
+ readonly RENDERBUFFER_STENCIL_SIZE: GLenum;
+ readonly RENDERBUFFER_WIDTH: GLenum;
+ readonly RENDERER: GLenum;
+ readonly REPEAT: GLenum;
+ readonly REPLACE: GLenum;
+ readonly RGB: GLenum;
+ readonly RGB565: GLenum;
+ readonly RGB5_A1: GLenum;
+ readonly RGBA: GLenum;
+ readonly RGBA4: GLenum;
+ readonly SAMPLER_2D: GLenum;
+ readonly SAMPLER_CUBE: GLenum;
+ readonly SAMPLES: GLenum;
+ readonly SAMPLE_ALPHA_TO_COVERAGE: GLenum;
+ readonly SAMPLE_BUFFERS: GLenum;
+ readonly SAMPLE_COVERAGE: GLenum;
+ readonly SAMPLE_COVERAGE_INVERT: GLenum;
+ readonly SAMPLE_COVERAGE_VALUE: GLenum;
+ readonly SCISSOR_BOX: GLenum;
+ readonly SCISSOR_TEST: GLenum;
+ readonly SHADER_TYPE: GLenum;
+ readonly SHADING_LANGUAGE_VERSION: GLenum;
+ readonly SHORT: GLenum;
+ readonly SRC_ALPHA: GLenum;
+ readonly SRC_ALPHA_SATURATE: GLenum;
+ readonly SRC_COLOR: GLenum;
+ readonly STATIC_DRAW: GLenum;
+ readonly STENCIL_ATTACHMENT: GLenum;
+ readonly STENCIL_BACK_FAIL: GLenum;
+ readonly STENCIL_BACK_FUNC: GLenum;
+ readonly STENCIL_BACK_PASS_DEPTH_FAIL: GLenum;
+ readonly STENCIL_BACK_PASS_DEPTH_PASS: GLenum;
+ readonly STENCIL_BACK_REF: GLenum;
+ readonly STENCIL_BACK_VALUE_MASK: GLenum;
+ readonly STENCIL_BACK_WRITEMASK: GLenum;
+ readonly STENCIL_BITS: GLenum;
+ readonly STENCIL_BUFFER_BIT: GLenum;
+ readonly STENCIL_CLEAR_VALUE: GLenum;
+ readonly STENCIL_FAIL: GLenum;
+ readonly STENCIL_FUNC: GLenum;
+ readonly STENCIL_INDEX8: GLenum;
+ readonly STENCIL_PASS_DEPTH_FAIL: GLenum;
+ readonly STENCIL_PASS_DEPTH_PASS: GLenum;
+ readonly STENCIL_REF: GLenum;
+ readonly STENCIL_TEST: GLenum;
+ readonly STENCIL_VALUE_MASK: GLenum;
+ readonly STENCIL_WRITEMASK: GLenum;
+ readonly STREAM_DRAW: GLenum;
+ readonly SUBPIXEL_BITS: GLenum;
+ readonly TEXTURE: GLenum;
+ readonly TEXTURE0: GLenum;
+ readonly TEXTURE1: GLenum;
+ readonly TEXTURE10: GLenum;
+ readonly TEXTURE11: GLenum;
+ readonly TEXTURE12: GLenum;
+ readonly TEXTURE13: GLenum;
+ readonly TEXTURE14: GLenum;
+ readonly TEXTURE15: GLenum;
+ readonly TEXTURE16: GLenum;
+ readonly TEXTURE17: GLenum;
+ readonly TEXTURE18: GLenum;
+ readonly TEXTURE19: GLenum;
+ readonly TEXTURE2: GLenum;
+ readonly TEXTURE20: GLenum;
+ readonly TEXTURE21: GLenum;
+ readonly TEXTURE22: GLenum;
+ readonly TEXTURE23: GLenum;
+ readonly TEXTURE24: GLenum;
+ readonly TEXTURE25: GLenum;
+ readonly TEXTURE26: GLenum;
+ readonly TEXTURE27: GLenum;
+ readonly TEXTURE28: GLenum;
+ readonly TEXTURE29: GLenum;
+ readonly TEXTURE3: GLenum;
+ readonly TEXTURE30: GLenum;
+ readonly TEXTURE31: GLenum;
+ readonly TEXTURE4: GLenum;
+ readonly TEXTURE5: GLenum;
+ readonly TEXTURE6: GLenum;
+ readonly TEXTURE7: GLenum;
+ readonly TEXTURE8: GLenum;
+ readonly TEXTURE9: GLenum;
+ readonly TEXTURE_2D: GLenum;
+ readonly TEXTURE_BINDING_2D: GLenum;
+ readonly TEXTURE_BINDING_CUBE_MAP: GLenum;
+ readonly TEXTURE_CUBE_MAP: GLenum;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_X: GLenum;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: GLenum;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: GLenum;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_X: GLenum;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_Y: GLenum;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_Z: GLenum;
+ readonly TEXTURE_MAG_FILTER: GLenum;
+ readonly TEXTURE_MIN_FILTER: GLenum;
+ readonly TEXTURE_WRAP_S: GLenum;
+ readonly TEXTURE_WRAP_T: GLenum;
+ readonly TRIANGLES: GLenum;
+ readonly TRIANGLE_FAN: GLenum;
+ readonly TRIANGLE_STRIP: GLenum;
+ readonly UNPACK_ALIGNMENT: GLenum;
+ readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: GLenum;
+ readonly UNPACK_FLIP_Y_WEBGL: GLenum;
+ readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: GLenum;
+ readonly UNSIGNED_BYTE: GLenum;
+ readonly UNSIGNED_INT: GLenum;
+ readonly UNSIGNED_SHORT: GLenum;
+ readonly UNSIGNED_SHORT_4_4_4_4: GLenum;
+ readonly UNSIGNED_SHORT_5_5_5_1: GLenum;
+ readonly UNSIGNED_SHORT_5_6_5: GLenum;
+ readonly VALIDATE_STATUS: GLenum;
+ readonly VENDOR: GLenum;
+ readonly VERSION: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_ENABLED: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_POINTER: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_SIZE: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_STRIDE: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_TYPE: GLenum;
+ readonly VERTEX_SHADER: GLenum;
+ readonly VIEWPORT: GLenum;
+ readonly ZERO: GLenum;
+ readonly ACTIVE_UNIFORM_BLOCKS: GLenum;
+ readonly ALREADY_SIGNALED: GLenum;
+ readonly ANY_SAMPLES_PASSED: GLenum;
+ readonly ANY_SAMPLES_PASSED_CONSERVATIVE: GLenum;
+ readonly COLOR: GLenum;
+ readonly COLOR_ATTACHMENT1: GLenum;
+ readonly COLOR_ATTACHMENT10: GLenum;
+ readonly COLOR_ATTACHMENT11: GLenum;
+ readonly COLOR_ATTACHMENT12: GLenum;
+ readonly COLOR_ATTACHMENT13: GLenum;
+ readonly COLOR_ATTACHMENT14: GLenum;
+ readonly COLOR_ATTACHMENT15: GLenum;
+ readonly COLOR_ATTACHMENT2: GLenum;
+ readonly COLOR_ATTACHMENT3: GLenum;
+ readonly COLOR_ATTACHMENT4: GLenum;
+ readonly COLOR_ATTACHMENT5: GLenum;
+ readonly COLOR_ATTACHMENT6: GLenum;
+ readonly COLOR_ATTACHMENT7: GLenum;
+ readonly COLOR_ATTACHMENT8: GLenum;
+ readonly COLOR_ATTACHMENT9: GLenum;
+ readonly COMPARE_REF_TO_TEXTURE: GLenum;
+ readonly CONDITION_SATISFIED: GLenum;
+ readonly COPY_READ_BUFFER: GLenum;
+ readonly COPY_READ_BUFFER_BINDING: GLenum;
+ readonly COPY_WRITE_BUFFER: GLenum;
+ readonly COPY_WRITE_BUFFER_BINDING: GLenum;
+ readonly CURRENT_QUERY: GLenum;
+ readonly DEPTH: GLenum;
+ readonly DEPTH24_STENCIL8: GLenum;
+ readonly DEPTH32F_STENCIL8: GLenum;
+ readonly DEPTH_COMPONENT24: GLenum;
+ readonly DEPTH_COMPONENT32F: GLenum;
+ readonly DRAW_BUFFER0: GLenum;
+ readonly DRAW_BUFFER1: GLenum;
+ readonly DRAW_BUFFER10: GLenum;
+ readonly DRAW_BUFFER11: GLenum;
+ readonly DRAW_BUFFER12: GLenum;
+ readonly DRAW_BUFFER13: GLenum;
+ readonly DRAW_BUFFER14: GLenum;
+ readonly DRAW_BUFFER15: GLenum;
+ readonly DRAW_BUFFER2: GLenum;
+ readonly DRAW_BUFFER3: GLenum;
+ readonly DRAW_BUFFER4: GLenum;
+ readonly DRAW_BUFFER5: GLenum;
+ readonly DRAW_BUFFER6: GLenum;
+ readonly DRAW_BUFFER7: GLenum;
+ readonly DRAW_BUFFER8: GLenum;
+ readonly DRAW_BUFFER9: GLenum;
+ readonly DRAW_FRAMEBUFFER: GLenum;
+ readonly DRAW_FRAMEBUFFER_BINDING: GLenum;
+ readonly DYNAMIC_COPY: GLenum;
+ readonly DYNAMIC_READ: GLenum;
+ readonly FLOAT_32_UNSIGNED_INT_24_8_REV: GLenum;
+ readonly FLOAT_MAT2x3: GLenum;
+ readonly FLOAT_MAT2x4: GLenum;
+ readonly FLOAT_MAT3x2: GLenum;
+ readonly FLOAT_MAT3x4: GLenum;
+ readonly FLOAT_MAT4x2: GLenum;
+ readonly FLOAT_MAT4x3: GLenum;
+ readonly FRAGMENT_SHADER_DERIVATIVE_HINT: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_RED_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: GLenum;
+ readonly FRAMEBUFFER_DEFAULT: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: GLenum;
+ readonly HALF_FLOAT: GLenum;
+ readonly INTERLEAVED_ATTRIBS: GLenum;
+ readonly INT_2_10_10_10_REV: GLenum;
+ readonly INT_SAMPLER_2D: GLenum;
+ readonly INT_SAMPLER_2D_ARRAY: GLenum;
+ readonly INT_SAMPLER_3D: GLenum;
+ readonly INT_SAMPLER_CUBE: GLenum;
+ readonly INVALID_INDEX: GLenum;
+ readonly MAX: GLenum;
+ readonly MAX_3D_TEXTURE_SIZE: GLenum;
+ readonly MAX_ARRAY_TEXTURE_LAYERS: GLenum;
+ readonly MAX_CLIENT_WAIT_TIMEOUT_WEBGL: GLenum;
+ readonly MAX_COLOR_ATTACHMENTS: GLenum;
+ readonly MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: GLenum;
+ readonly MAX_COMBINED_UNIFORM_BLOCKS: GLenum;
+ readonly MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: GLenum;
+ readonly MAX_DRAW_BUFFERS: GLenum;
+ readonly MAX_ELEMENTS_INDICES: GLenum;
+ readonly MAX_ELEMENTS_VERTICES: GLenum;
+ readonly MAX_ELEMENT_INDEX: GLenum;
+ readonly MAX_FRAGMENT_INPUT_COMPONENTS: GLenum;
+ readonly MAX_FRAGMENT_UNIFORM_BLOCKS: GLenum;
+ readonly MAX_FRAGMENT_UNIFORM_COMPONENTS: GLenum;
+ readonly MAX_PROGRAM_TEXEL_OFFSET: GLenum;
+ readonly MAX_SAMPLES: GLenum;
+ readonly MAX_SERVER_WAIT_TIMEOUT: GLenum;
+ readonly MAX_TEXTURE_LOD_BIAS: GLenum;
+ readonly MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: GLenum;
+ readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: GLenum;
+ readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: GLenum;
+ readonly MAX_UNIFORM_BLOCK_SIZE: GLenum;
+ readonly MAX_UNIFORM_BUFFER_BINDINGS: GLenum;
+ readonly MAX_VARYING_COMPONENTS: GLenum;
+ readonly MAX_VERTEX_OUTPUT_COMPONENTS: GLenum;
+ readonly MAX_VERTEX_UNIFORM_BLOCKS: GLenum;
+ readonly MAX_VERTEX_UNIFORM_COMPONENTS: GLenum;
+ readonly MIN: GLenum;
+ readonly MIN_PROGRAM_TEXEL_OFFSET: GLenum;
+ readonly OBJECT_TYPE: GLenum;
+ readonly PACK_ROW_LENGTH: GLenum;
+ readonly PACK_SKIP_PIXELS: GLenum;
+ readonly PACK_SKIP_ROWS: GLenum;
+ readonly PIXEL_PACK_BUFFER: GLenum;
+ readonly PIXEL_PACK_BUFFER_BINDING: GLenum;
+ readonly PIXEL_UNPACK_BUFFER: GLenum;
+ readonly PIXEL_UNPACK_BUFFER_BINDING: GLenum;
+ readonly QUERY_RESULT: GLenum;
+ readonly QUERY_RESULT_AVAILABLE: GLenum;
+ readonly R11F_G11F_B10F: GLenum;
+ readonly R16F: GLenum;
+ readonly R16I: GLenum;
+ readonly R16UI: GLenum;
+ readonly R32F: GLenum;
+ readonly R32I: GLenum;
+ readonly R32UI: GLenum;
+ readonly R8: GLenum;
+ readonly R8I: GLenum;
+ readonly R8UI: GLenum;
+ readonly R8_SNORM: GLenum;
+ readonly RASTERIZER_DISCARD: GLenum;
+ readonly READ_BUFFER: GLenum;
+ readonly READ_FRAMEBUFFER: GLenum;
+ readonly READ_FRAMEBUFFER_BINDING: GLenum;
+ readonly RED: GLenum;
+ readonly RED_INTEGER: GLenum;
+ readonly RENDERBUFFER_SAMPLES: GLenum;
+ readonly RG: GLenum;
+ readonly RG16F: GLenum;
+ readonly RG16I: GLenum;
+ readonly RG16UI: GLenum;
+ readonly RG32F: GLenum;
+ readonly RG32I: GLenum;
+ readonly RG32UI: GLenum;
+ readonly RG8: GLenum;
+ readonly RG8I: GLenum;
+ readonly RG8UI: GLenum;
+ readonly RG8_SNORM: GLenum;
+ readonly RGB10_A2: GLenum;
+ readonly RGB10_A2UI: GLenum;
+ readonly RGB16F: GLenum;
+ readonly RGB16I: GLenum;
+ readonly RGB16UI: GLenum;
+ readonly RGB32F: GLenum;
+ readonly RGB32I: GLenum;
+ readonly RGB32UI: GLenum;
+ readonly RGB8: GLenum;
+ readonly RGB8I: GLenum;
+ readonly RGB8UI: GLenum;
+ readonly RGB8_SNORM: GLenum;
+ readonly RGB9_E5: GLenum;
+ readonly RGBA16F: GLenum;
+ readonly RGBA16I: GLenum;
+ readonly RGBA16UI: GLenum;
+ readonly RGBA32F: GLenum;
+ readonly RGBA32I: GLenum;
+ readonly RGBA32UI: GLenum;
+ readonly RGBA8: GLenum;
+ readonly RGBA8I: GLenum;
+ readonly RGBA8UI: GLenum;
+ readonly RGBA8_SNORM: GLenum;
+ readonly RGBA_INTEGER: GLenum;
+ readonly RGB_INTEGER: GLenum;
+ readonly RG_INTEGER: GLenum;
+ readonly SAMPLER_2D_ARRAY: GLenum;
+ readonly SAMPLER_2D_ARRAY_SHADOW: GLenum;
+ readonly SAMPLER_2D_SHADOW: GLenum;
+ readonly SAMPLER_3D: GLenum;
+ readonly SAMPLER_BINDING: GLenum;
+ readonly SAMPLER_CUBE_SHADOW: GLenum;
+ readonly SEPARATE_ATTRIBS: GLenum;
+ readonly SIGNALED: GLenum;
+ readonly SIGNED_NORMALIZED: GLenum;
+ readonly SRGB: GLenum;
+ readonly SRGB8: GLenum;
+ readonly SRGB8_ALPHA8: GLenum;
+ readonly STATIC_COPY: GLenum;
+ readonly STATIC_READ: GLenum;
+ readonly STENCIL: GLenum;
+ readonly STREAM_COPY: GLenum;
+ readonly STREAM_READ: GLenum;
+ readonly SYNC_CONDITION: GLenum;
+ readonly SYNC_FENCE: GLenum;
+ readonly SYNC_FLAGS: GLenum;
+ readonly SYNC_FLUSH_COMMANDS_BIT: GLenum;
+ readonly SYNC_GPU_COMMANDS_COMPLETE: GLenum;
+ readonly SYNC_STATUS: GLenum;
+ readonly TEXTURE_2D_ARRAY: GLenum;
+ readonly TEXTURE_3D: GLenum;
+ readonly TEXTURE_BASE_LEVEL: GLenum;
+ readonly TEXTURE_BINDING_2D_ARRAY: GLenum;
+ readonly TEXTURE_BINDING_3D: GLenum;
+ readonly TEXTURE_COMPARE_FUNC: GLenum;
+ readonly TEXTURE_COMPARE_MODE: GLenum;
+ readonly TEXTURE_IMMUTABLE_FORMAT: GLenum;
+ readonly TEXTURE_IMMUTABLE_LEVELS: GLenum;
+ readonly TEXTURE_MAX_LEVEL: GLenum;
+ readonly TEXTURE_MAX_LOD: GLenum;
+ readonly TEXTURE_MIN_LOD: GLenum;
+ readonly TEXTURE_WRAP_R: GLenum;
+ readonly TIMEOUT_EXPIRED: GLenum;
+ readonly TIMEOUT_IGNORED: GLint64;
+ readonly TRANSFORM_FEEDBACK: GLenum;
+ readonly TRANSFORM_FEEDBACK_ACTIVE: GLenum;
+ readonly TRANSFORM_FEEDBACK_BINDING: GLenum;
+ readonly TRANSFORM_FEEDBACK_BUFFER: GLenum;
+ readonly TRANSFORM_FEEDBACK_BUFFER_BINDING: GLenum;
+ readonly TRANSFORM_FEEDBACK_BUFFER_MODE: GLenum;
+ readonly TRANSFORM_FEEDBACK_BUFFER_SIZE: GLenum;
+ readonly TRANSFORM_FEEDBACK_BUFFER_START: GLenum;
+ readonly TRANSFORM_FEEDBACK_PAUSED: GLenum;
+ readonly TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: GLenum;
+ readonly TRANSFORM_FEEDBACK_VARYINGS: GLenum;
+ readonly UNIFORM_ARRAY_STRIDE: GLenum;
+ readonly UNIFORM_BLOCK_ACTIVE_UNIFORMS: GLenum;
+ readonly UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: GLenum;
+ readonly UNIFORM_BLOCK_BINDING: GLenum;
+ readonly UNIFORM_BLOCK_DATA_SIZE: GLenum;
+ readonly UNIFORM_BLOCK_INDEX: GLenum;
+ readonly UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: GLenum;
+ readonly UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: GLenum;
+ readonly UNIFORM_BUFFER: GLenum;
+ readonly UNIFORM_BUFFER_BINDING: GLenum;
+ readonly UNIFORM_BUFFER_OFFSET_ALIGNMENT: GLenum;
+ readonly UNIFORM_BUFFER_SIZE: GLenum;
+ readonly UNIFORM_BUFFER_START: GLenum;
+ readonly UNIFORM_IS_ROW_MAJOR: GLenum;
+ readonly UNIFORM_MATRIX_STRIDE: GLenum;
+ readonly UNIFORM_OFFSET: GLenum;
+ readonly UNIFORM_SIZE: GLenum;
+ readonly UNIFORM_TYPE: GLenum;
+ readonly UNPACK_IMAGE_HEIGHT: GLenum;
+ readonly UNPACK_ROW_LENGTH: GLenum;
+ readonly UNPACK_SKIP_IMAGES: GLenum;
+ readonly UNPACK_SKIP_PIXELS: GLenum;
+ readonly UNPACK_SKIP_ROWS: GLenum;
+ readonly UNSIGNALED: GLenum;
+ readonly UNSIGNED_INT_10F_11F_11F_REV: GLenum;
+ readonly UNSIGNED_INT_24_8: GLenum;
+ readonly UNSIGNED_INT_2_10_10_10_REV: GLenum;
+ readonly UNSIGNED_INT_5_9_9_9_REV: GLenum;
+ readonly UNSIGNED_INT_SAMPLER_2D: GLenum;
+ readonly UNSIGNED_INT_SAMPLER_2D_ARRAY: GLenum;
+ readonly UNSIGNED_INT_SAMPLER_3D: GLenum;
+ readonly UNSIGNED_INT_SAMPLER_CUBE: GLenum;
+ readonly UNSIGNED_INT_VEC2: GLenum;
+ readonly UNSIGNED_INT_VEC3: GLenum;
+ readonly UNSIGNED_INT_VEC4: GLenum;
+ readonly UNSIGNED_NORMALIZED: GLenum;
+ readonly VERTEX_ARRAY_BINDING: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_DIVISOR: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_INTEGER: GLenum;
+ readonly WAIT_FAILED: GLenum;
+};
+
+interface WebGL2RenderingContextBase {
+ beginQuery(target: GLenum, query: WebGLQuery): void;
+ beginTransformFeedback(primitiveMode: GLenum): void;
+ bindBufferBase(target: GLenum, index: GLuint, buffer: WebGLBuffer | null): void;
+ bindBufferRange(target: GLenum, index: GLuint, buffer: WebGLBuffer | null, offset: GLintptr, size: GLsizeiptr): void;
+ bindSampler(unit: GLuint, sampler: WebGLSampler | null): void;
+ bindTransformFeedback(target: GLenum, tf: WebGLTransformFeedback | null): void;
+ bindVertexArray(array: WebGLVertexArrayObject | null): void;
+ blitFramebuffer(srcX0: GLint, srcY0: GLint, srcX1: GLint, srcY1: GLint, dstX0: GLint, dstY0: GLint, dstX1: GLint, dstY1: GLint, mask: GLbitfield, filter: GLenum): void;
+ clearBufferfi(buffer: GLenum, drawbuffer: GLint, depth: GLfloat, stencil: GLint): void;
+ clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Float32List, srcOffset?: GLuint): void;
+ clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Int32List, srcOffset?: GLuint): void;
+ clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Uint32List, srcOffset?: GLuint): void;
+ clientWaitSync(sync: WebGLSync, flags: GLbitfield, timeout: GLuint64): GLenum;
+ compressedTexImage3D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, imageSize: GLsizei, offset: GLintptr): void;
+ compressedTexImage3D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint): void;
+ compressedTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, imageSize: GLsizei, offset: GLintptr): void;
+ compressedTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint): void;
+ copyBufferSubData(readTarget: GLenum, writeTarget: GLenum, readOffset: GLintptr, writeOffset: GLintptr, size: GLsizeiptr): void;
+ copyTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
+ createQuery(): WebGLQuery | null;
+ createSampler(): WebGLSampler | null;
+ createTransformFeedback(): WebGLTransformFeedback | null;
+ createVertexArray(): WebGLVertexArrayObject | null;
+ deleteQuery(query: WebGLQuery | null): void;
+ deleteSampler(sampler: WebGLSampler | null): void;
+ deleteSync(sync: WebGLSync | null): void;
+ deleteTransformFeedback(tf: WebGLTransformFeedback | null): void;
+ deleteVertexArray(vertexArray: WebGLVertexArrayObject | null): void;
+ drawArraysInstanced(mode: GLenum, first: GLint, count: GLsizei, instanceCount: GLsizei): void;
+ drawBuffers(buffers: GLenum[]): void;
+ drawElementsInstanced(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr, instanceCount: GLsizei): void;
+ drawRangeElements(mode: GLenum, start: GLuint, end: GLuint, count: GLsizei, type: GLenum, offset: GLintptr): void;
+ endQuery(target: GLenum): void;
+ endTransformFeedback(): void;
+ fenceSync(condition: GLenum, flags: GLbitfield): WebGLSync | null;
+ framebufferTextureLayer(target: GLenum, attachment: GLenum, texture: WebGLTexture | null, level: GLint, layer: GLint): void;
+ getActiveUniformBlockName(program: WebGLProgram, uniformBlockIndex: GLuint): string | null;
+ getActiveUniformBlockParameter(program: WebGLProgram, uniformBlockIndex: GLuint, pname: GLenum): any;
+ getActiveUniforms(program: WebGLProgram, uniformIndices: GLuint[], pname: GLenum): any;
+ getBufferSubData(target: GLenum, srcByteOffset: GLintptr, dstBuffer: ArrayBufferView, dstOffset?: GLuint, length?: GLuint): void;
+ getFragDataLocation(program: WebGLProgram, name: string): GLint;
+ getIndexedParameter(target: GLenum, index: GLuint): any;
+ getInternalformatParameter(target: GLenum, internalformat: GLenum, pname: GLenum): any;
+ getQuery(target: GLenum, pname: GLenum): WebGLQuery | null;
+ getQueryParameter(query: WebGLQuery, pname: GLenum): any;
+ getSamplerParameter(sampler: WebGLSampler, pname: GLenum): any;
+ getSyncParameter(sync: WebGLSync, pname: GLenum): any;
+ getTransformFeedbackVarying(program: WebGLProgram, index: GLuint): WebGLActiveInfo | null;
+ getUniformBlockIndex(program: WebGLProgram, uniformBlockName: string): GLuint;
+ getUniformIndices(program: WebGLProgram, uniformNames: string[]): GLuint[] | null;
+ invalidateFramebuffer(target: GLenum, attachments: GLenum[]): void;
+ invalidateSubFramebuffer(target: GLenum, attachments: GLenum[], x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
+ isQuery(query: WebGLQuery | null): GLboolean;
+ isSampler(sampler: WebGLSampler | null): GLboolean;
+ isSync(sync: WebGLSync | null): GLboolean;
+ isTransformFeedback(tf: WebGLTransformFeedback | null): GLboolean;
+ isVertexArray(vertexArray: WebGLVertexArrayObject | null): GLboolean;
+ pauseTransformFeedback(): void;
+ readBuffer(src: GLenum): void;
+ renderbufferStorageMultisample(target: GLenum, samples: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei): void;
+ resumeTransformFeedback(): void;
+ samplerParameterf(sampler: WebGLSampler, pname: GLenum, param: GLfloat): void;
+ samplerParameteri(sampler: WebGLSampler, pname: GLenum, param: GLint): void;
+ texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, pboOffset: GLintptr): void;
+ texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
+ texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView | null): void;
+ texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint): void;
+ texStorage2D(target: GLenum, levels: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei): void;
+ texStorage3D(target: GLenum, levels: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei): void;
+ texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, pboOffset: GLintptr): void;
+ texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, source: TexImageSource): void;
+ texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView | null, srcOffset?: GLuint): void;
+ transformFeedbackVaryings(program: WebGLProgram, varyings: string[], bufferMode: GLenum): void;
+ uniform1ui(location: WebGLUniformLocation | null, v0: GLuint): void;
+ uniform1uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform2ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint): void;
+ uniform2uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform3ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint, v2: GLuint): void;
+ uniform3uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform4ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint, v2: GLuint, v3: GLuint): void;
+ uniform4uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformBlockBinding(program: WebGLProgram, uniformBlockIndex: GLuint, uniformBlockBinding: GLuint): void;
+ uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix3x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ vertexAttribDivisor(index: GLuint, divisor: GLuint): void;
+ vertexAttribI4i(index: GLuint, x: GLint, y: GLint, z: GLint, w: GLint): void;
+ vertexAttribI4iv(index: GLuint, values: Int32List): void;
+ vertexAttribI4ui(index: GLuint, x: GLuint, y: GLuint, z: GLuint, w: GLuint): void;
+ vertexAttribI4uiv(index: GLuint, values: Uint32List): void;
+ vertexAttribIPointer(index: GLuint, size: GLint, type: GLenum, stride: GLsizei, offset: GLintptr): void;
+ waitSync(sync: WebGLSync, flags: GLbitfield, timeout: GLint64): void;
+ readonly ACTIVE_UNIFORM_BLOCKS: GLenum;
+ readonly ALREADY_SIGNALED: GLenum;
+ readonly ANY_SAMPLES_PASSED: GLenum;
+ readonly ANY_SAMPLES_PASSED_CONSERVATIVE: GLenum;
+ readonly COLOR: GLenum;
+ readonly COLOR_ATTACHMENT1: GLenum;
+ readonly COLOR_ATTACHMENT10: GLenum;
+ readonly COLOR_ATTACHMENT11: GLenum;
+ readonly COLOR_ATTACHMENT12: GLenum;
+ readonly COLOR_ATTACHMENT13: GLenum;
+ readonly COLOR_ATTACHMENT14: GLenum;
+ readonly COLOR_ATTACHMENT15: GLenum;
+ readonly COLOR_ATTACHMENT2: GLenum;
+ readonly COLOR_ATTACHMENT3: GLenum;
+ readonly COLOR_ATTACHMENT4: GLenum;
+ readonly COLOR_ATTACHMENT5: GLenum;
+ readonly COLOR_ATTACHMENT6: GLenum;
+ readonly COLOR_ATTACHMENT7: GLenum;
+ readonly COLOR_ATTACHMENT8: GLenum;
+ readonly COLOR_ATTACHMENT9: GLenum;
+ readonly COMPARE_REF_TO_TEXTURE: GLenum;
+ readonly CONDITION_SATISFIED: GLenum;
+ readonly COPY_READ_BUFFER: GLenum;
+ readonly COPY_READ_BUFFER_BINDING: GLenum;
+ readonly COPY_WRITE_BUFFER: GLenum;
+ readonly COPY_WRITE_BUFFER_BINDING: GLenum;
+ readonly CURRENT_QUERY: GLenum;
+ readonly DEPTH: GLenum;
+ readonly DEPTH24_STENCIL8: GLenum;
+ readonly DEPTH32F_STENCIL8: GLenum;
+ readonly DEPTH_COMPONENT24: GLenum;
+ readonly DEPTH_COMPONENT32F: GLenum;
+ readonly DRAW_BUFFER0: GLenum;
+ readonly DRAW_BUFFER1: GLenum;
+ readonly DRAW_BUFFER10: GLenum;
+ readonly DRAW_BUFFER11: GLenum;
+ readonly DRAW_BUFFER12: GLenum;
+ readonly DRAW_BUFFER13: GLenum;
+ readonly DRAW_BUFFER14: GLenum;
+ readonly DRAW_BUFFER15: GLenum;
+ readonly DRAW_BUFFER2: GLenum;
+ readonly DRAW_BUFFER3: GLenum;
+ readonly DRAW_BUFFER4: GLenum;
+ readonly DRAW_BUFFER5: GLenum;
+ readonly DRAW_BUFFER6: GLenum;
+ readonly DRAW_BUFFER7: GLenum;
+ readonly DRAW_BUFFER8: GLenum;
+ readonly DRAW_BUFFER9: GLenum;
+ readonly DRAW_FRAMEBUFFER: GLenum;
+ readonly DRAW_FRAMEBUFFER_BINDING: GLenum;
+ readonly DYNAMIC_COPY: GLenum;
+ readonly DYNAMIC_READ: GLenum;
+ readonly FLOAT_32_UNSIGNED_INT_24_8_REV: GLenum;
+ readonly FLOAT_MAT2x3: GLenum;
+ readonly FLOAT_MAT2x4: GLenum;
+ readonly FLOAT_MAT3x2: GLenum;
+ readonly FLOAT_MAT3x4: GLenum;
+ readonly FLOAT_MAT4x2: GLenum;
+ readonly FLOAT_MAT4x3: GLenum;
+ readonly FRAGMENT_SHADER_DERIVATIVE_HINT: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_RED_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: GLenum;
+ readonly FRAMEBUFFER_DEFAULT: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: GLenum;
+ readonly HALF_FLOAT: GLenum;
+ readonly INTERLEAVED_ATTRIBS: GLenum;
+ readonly INT_2_10_10_10_REV: GLenum;
+ readonly INT_SAMPLER_2D: GLenum;
+ readonly INT_SAMPLER_2D_ARRAY: GLenum;
+ readonly INT_SAMPLER_3D: GLenum;
+ readonly INT_SAMPLER_CUBE: GLenum;
+ readonly INVALID_INDEX: GLenum;
+ readonly MAX: GLenum;
+ readonly MAX_3D_TEXTURE_SIZE: GLenum;
+ readonly MAX_ARRAY_TEXTURE_LAYERS: GLenum;
+ readonly MAX_CLIENT_WAIT_TIMEOUT_WEBGL: GLenum;
+ readonly MAX_COLOR_ATTACHMENTS: GLenum;
+ readonly MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: GLenum;
+ readonly MAX_COMBINED_UNIFORM_BLOCKS: GLenum;
+ readonly MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: GLenum;
+ readonly MAX_DRAW_BUFFERS: GLenum;
+ readonly MAX_ELEMENTS_INDICES: GLenum;
+ readonly MAX_ELEMENTS_VERTICES: GLenum;
+ readonly MAX_ELEMENT_INDEX: GLenum;
+ readonly MAX_FRAGMENT_INPUT_COMPONENTS: GLenum;
+ readonly MAX_FRAGMENT_UNIFORM_BLOCKS: GLenum;
+ readonly MAX_FRAGMENT_UNIFORM_COMPONENTS: GLenum;
+ readonly MAX_PROGRAM_TEXEL_OFFSET: GLenum;
+ readonly MAX_SAMPLES: GLenum;
+ readonly MAX_SERVER_WAIT_TIMEOUT: GLenum;
+ readonly MAX_TEXTURE_LOD_BIAS: GLenum;
+ readonly MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: GLenum;
+ readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: GLenum;
+ readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: GLenum;
+ readonly MAX_UNIFORM_BLOCK_SIZE: GLenum;
+ readonly MAX_UNIFORM_BUFFER_BINDINGS: GLenum;
+ readonly MAX_VARYING_COMPONENTS: GLenum;
+ readonly MAX_VERTEX_OUTPUT_COMPONENTS: GLenum;
+ readonly MAX_VERTEX_UNIFORM_BLOCKS: GLenum;
+ readonly MAX_VERTEX_UNIFORM_COMPONENTS: GLenum;
+ readonly MIN: GLenum;
+ readonly MIN_PROGRAM_TEXEL_OFFSET: GLenum;
+ readonly OBJECT_TYPE: GLenum;
+ readonly PACK_ROW_LENGTH: GLenum;
+ readonly PACK_SKIP_PIXELS: GLenum;
+ readonly PACK_SKIP_ROWS: GLenum;
+ readonly PIXEL_PACK_BUFFER: GLenum;
+ readonly PIXEL_PACK_BUFFER_BINDING: GLenum;
+ readonly PIXEL_UNPACK_BUFFER: GLenum;
+ readonly PIXEL_UNPACK_BUFFER_BINDING: GLenum;
+ readonly QUERY_RESULT: GLenum;
+ readonly QUERY_RESULT_AVAILABLE: GLenum;
+ readonly R11F_G11F_B10F: GLenum;
+ readonly R16F: GLenum;
+ readonly R16I: GLenum;
+ readonly R16UI: GLenum;
+ readonly R32F: GLenum;
+ readonly R32I: GLenum;
+ readonly R32UI: GLenum;
+ readonly R8: GLenum;
+ readonly R8I: GLenum;
+ readonly R8UI: GLenum;
+ readonly R8_SNORM: GLenum;
+ readonly RASTERIZER_DISCARD: GLenum;
+ readonly READ_BUFFER: GLenum;
+ readonly READ_FRAMEBUFFER: GLenum;
+ readonly READ_FRAMEBUFFER_BINDING: GLenum;
+ readonly RED: GLenum;
+ readonly RED_INTEGER: GLenum;
+ readonly RENDERBUFFER_SAMPLES: GLenum;
+ readonly RG: GLenum;
+ readonly RG16F: GLenum;
+ readonly RG16I: GLenum;
+ readonly RG16UI: GLenum;
+ readonly RG32F: GLenum;
+ readonly RG32I: GLenum;
+ readonly RG32UI: GLenum;
+ readonly RG8: GLenum;
+ readonly RG8I: GLenum;
+ readonly RG8UI: GLenum;
+ readonly RG8_SNORM: GLenum;
+ readonly RGB10_A2: GLenum;
+ readonly RGB10_A2UI: GLenum;
+ readonly RGB16F: GLenum;
+ readonly RGB16I: GLenum;
+ readonly RGB16UI: GLenum;
+ readonly RGB32F: GLenum;
+ readonly RGB32I: GLenum;
+ readonly RGB32UI: GLenum;
+ readonly RGB8: GLenum;
+ readonly RGB8I: GLenum;
+ readonly RGB8UI: GLenum;
+ readonly RGB8_SNORM: GLenum;
+ readonly RGB9_E5: GLenum;
+ readonly RGBA16F: GLenum;
+ readonly RGBA16I: GLenum;
+ readonly RGBA16UI: GLenum;
+ readonly RGBA32F: GLenum;
+ readonly RGBA32I: GLenum;
+ readonly RGBA32UI: GLenum;
+ readonly RGBA8: GLenum;
+ readonly RGBA8I: GLenum;
+ readonly RGBA8UI: GLenum;
+ readonly RGBA8_SNORM: GLenum;
+ readonly RGBA_INTEGER: GLenum;
+ readonly RGB_INTEGER: GLenum;
+ readonly RG_INTEGER: GLenum;
+ readonly SAMPLER_2D_ARRAY: GLenum;
+ readonly SAMPLER_2D_ARRAY_SHADOW: GLenum;
+ readonly SAMPLER_2D_SHADOW: GLenum;
+ readonly SAMPLER_3D: GLenum;
+ readonly SAMPLER_BINDING: GLenum;
+ readonly SAMPLER_CUBE_SHADOW: GLenum;
+ readonly SEPARATE_ATTRIBS: GLenum;
+ readonly SIGNALED: GLenum;
+ readonly SIGNED_NORMALIZED: GLenum;
+ readonly SRGB: GLenum;
+ readonly SRGB8: GLenum;
+ readonly SRGB8_ALPHA8: GLenum;
+ readonly STATIC_COPY: GLenum;
+ readonly STATIC_READ: GLenum;
+ readonly STENCIL: GLenum;
+ readonly STREAM_COPY: GLenum;
+ readonly STREAM_READ: GLenum;
+ readonly SYNC_CONDITION: GLenum;
+ readonly SYNC_FENCE: GLenum;
+ readonly SYNC_FLAGS: GLenum;
+ readonly SYNC_FLUSH_COMMANDS_BIT: GLenum;
+ readonly SYNC_GPU_COMMANDS_COMPLETE: GLenum;
+ readonly SYNC_STATUS: GLenum;
+ readonly TEXTURE_2D_ARRAY: GLenum;
+ readonly TEXTURE_3D: GLenum;
+ readonly TEXTURE_BASE_LEVEL: GLenum;
+ readonly TEXTURE_BINDING_2D_ARRAY: GLenum;
+ readonly TEXTURE_BINDING_3D: GLenum;
+ readonly TEXTURE_COMPARE_FUNC: GLenum;
+ readonly TEXTURE_COMPARE_MODE: GLenum;
+ readonly TEXTURE_IMMUTABLE_FORMAT: GLenum;
+ readonly TEXTURE_IMMUTABLE_LEVELS: GLenum;
+ readonly TEXTURE_MAX_LEVEL: GLenum;
+ readonly TEXTURE_MAX_LOD: GLenum;
+ readonly TEXTURE_MIN_LOD: GLenum;
+ readonly TEXTURE_WRAP_R: GLenum;
+ readonly TIMEOUT_EXPIRED: GLenum;
+ readonly TIMEOUT_IGNORED: GLint64;
+ readonly TRANSFORM_FEEDBACK: GLenum;
+ readonly TRANSFORM_FEEDBACK_ACTIVE: GLenum;
+ readonly TRANSFORM_FEEDBACK_BINDING: GLenum;
+ readonly TRANSFORM_FEEDBACK_BUFFER: GLenum;
+ readonly TRANSFORM_FEEDBACK_BUFFER_BINDING: GLenum;
+ readonly TRANSFORM_FEEDBACK_BUFFER_MODE: GLenum;
+ readonly TRANSFORM_FEEDBACK_BUFFER_SIZE: GLenum;
+ readonly TRANSFORM_FEEDBACK_BUFFER_START: GLenum;
+ readonly TRANSFORM_FEEDBACK_PAUSED: GLenum;
+ readonly TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: GLenum;
+ readonly TRANSFORM_FEEDBACK_VARYINGS: GLenum;
+ readonly UNIFORM_ARRAY_STRIDE: GLenum;
+ readonly UNIFORM_BLOCK_ACTIVE_UNIFORMS: GLenum;
+ readonly UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: GLenum;
+ readonly UNIFORM_BLOCK_BINDING: GLenum;
+ readonly UNIFORM_BLOCK_DATA_SIZE: GLenum;
+ readonly UNIFORM_BLOCK_INDEX: GLenum;
+ readonly UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: GLenum;
+ readonly UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: GLenum;
+ readonly UNIFORM_BUFFER: GLenum;
+ readonly UNIFORM_BUFFER_BINDING: GLenum;
+ readonly UNIFORM_BUFFER_OFFSET_ALIGNMENT: GLenum;
+ readonly UNIFORM_BUFFER_SIZE: GLenum;
+ readonly UNIFORM_BUFFER_START: GLenum;
+ readonly UNIFORM_IS_ROW_MAJOR: GLenum;
+ readonly UNIFORM_MATRIX_STRIDE: GLenum;
+ readonly UNIFORM_OFFSET: GLenum;
+ readonly UNIFORM_SIZE: GLenum;
+ readonly UNIFORM_TYPE: GLenum;
+ readonly UNPACK_IMAGE_HEIGHT: GLenum;
+ readonly UNPACK_ROW_LENGTH: GLenum;
+ readonly UNPACK_SKIP_IMAGES: GLenum;
+ readonly UNPACK_SKIP_PIXELS: GLenum;
+ readonly UNPACK_SKIP_ROWS: GLenum;
+ readonly UNSIGNALED: GLenum;
+ readonly UNSIGNED_INT_10F_11F_11F_REV: GLenum;
+ readonly UNSIGNED_INT_24_8: GLenum;
+ readonly UNSIGNED_INT_2_10_10_10_REV: GLenum;
+ readonly UNSIGNED_INT_5_9_9_9_REV: GLenum;
+ readonly UNSIGNED_INT_SAMPLER_2D: GLenum;
+ readonly UNSIGNED_INT_SAMPLER_2D_ARRAY: GLenum;
+ readonly UNSIGNED_INT_SAMPLER_3D: GLenum;
+ readonly UNSIGNED_INT_SAMPLER_CUBE: GLenum;
+ readonly UNSIGNED_INT_VEC2: GLenum;
+ readonly UNSIGNED_INT_VEC3: GLenum;
+ readonly UNSIGNED_INT_VEC4: GLenum;
+ readonly UNSIGNED_NORMALIZED: GLenum;
+ readonly VERTEX_ARRAY_BINDING: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_DIVISOR: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_INTEGER: GLenum;
+ readonly WAIT_FAILED: GLenum;
+}
+
+interface WebGL2RenderingContextOverloads {
+ bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum): void;
+ bufferData(target: GLenum, srcData: BufferSource | null, usage: GLenum): void;
+ bufferData(target: GLenum, srcData: ArrayBufferView, usage: GLenum, srcOffset: GLuint, length?: GLuint): void;
+ bufferSubData(target: GLenum, dstByteOffset: GLintptr, srcData: BufferSource): void;
+ bufferSubData(target: GLenum, dstByteOffset: GLintptr, srcData: ArrayBufferView, srcOffset: GLuint, length?: GLuint): void;
+ compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, imageSize: GLsizei, offset: GLintptr): void;
+ compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint): void;
+ compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, imageSize: GLsizei, offset: GLintptr): void;
+ compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint): void;
+ readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, dstData: ArrayBufferView | null): void;
+ readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, offset: GLintptr): void;
+ readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, dstData: ArrayBufferView, dstOffset: GLuint): void;
+ texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
+ texImage2D(target: GLenum, level: GLint, internalformat: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
+ texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pboOffset: GLintptr): void;
+ texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
+ texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint): void;
+ texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
+ texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
+ texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pboOffset: GLintptr): void;
+ texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, source: TexImageSource): void;
+ texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint): void;
+ uniform1fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform1iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform2fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform2iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform3fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform3iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform4fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform4iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+}
+
+/** Part of the WebGL API and represents the information returned by calling the WebGLRenderingContext.getActiveAttrib() and WebGLRenderingContext.getActiveUniform() methods. */
+interface WebGLActiveInfo {
+ readonly name: string;
+ readonly size: GLint;
+ readonly type: GLenum;
+}
+
+declare var WebGLActiveInfo: {
+ prototype: WebGLActiveInfo;
+ new(): WebGLActiveInfo;
+};
+
+/** Part of the WebGL API and represents an opaque buffer object storing data such as vertices or colors. */
+interface WebGLBuffer extends WebGLObject {
+}
+
+declare var WebGLBuffer: {
+ prototype: WebGLBuffer;
+ new(): WebGLBuffer;
+};
+
+/** The WebContextEvent interface is part of the WebGL API and is an interface for an event that is generated in response to a status change to the WebGL rendering context. */
+interface WebGLContextEvent extends Event {
+ readonly statusMessage: string;
+}
+
+declare var WebGLContextEvent: {
+ prototype: WebGLContextEvent;
+ new(type: string, eventInit?: WebGLContextEventInit): WebGLContextEvent;
+};
+
+/** Part of the WebGL API and represents a collection of buffers that serve as a rendering destination. */
+interface WebGLFramebuffer extends WebGLObject {
+}
+
+declare var WebGLFramebuffer: {
+ prototype: WebGLFramebuffer;
+ new(): WebGLFramebuffer;
+};
+
+interface WebGLObject {
+}
+
+declare var WebGLObject: {
+ prototype: WebGLObject;
+ new(): WebGLObject;
+};
+
+/** The WebGLProgram is part of the WebGL API and is a combination of two compiled WebGLShaders consisting of a vertex shader and a fragment shader (both written in GLSL). */
+interface WebGLProgram extends WebGLObject {
+}
+
+declare var WebGLProgram: {
+ prototype: WebGLProgram;
+ new(): WebGLProgram;
+};
+
+interface WebGLQuery extends WebGLObject {
+}
+
+declare var WebGLQuery: {
+ prototype: WebGLQuery;
+ new(): WebGLQuery;
+};
+
+/** Part of the WebGL API and represents a buffer that can contain an image, or can be source or target of an rendering operation. */
+interface WebGLRenderbuffer extends WebGLObject {
+}
+
+declare var WebGLRenderbuffer: {
+ prototype: WebGLRenderbuffer;
+ new(): WebGLRenderbuffer;
+};
+
+/** Provides an interface to the OpenGL ES 2.0 graphics rendering context for the drawing surface of an HTML <canvas> element. */
+interface WebGLRenderingContext extends WebGLRenderingContextBase, WebGLRenderingContextOverloads {
+}
+
+declare var WebGLRenderingContext: {
+ prototype: WebGLRenderingContext;
+ new(): WebGLRenderingContext;
+ readonly ACTIVE_ATTRIBUTES: GLenum;
+ readonly ACTIVE_TEXTURE: GLenum;
+ readonly ACTIVE_UNIFORMS: GLenum;
+ readonly ALIASED_LINE_WIDTH_RANGE: GLenum;
+ readonly ALIASED_POINT_SIZE_RANGE: GLenum;
+ readonly ALPHA: GLenum;
+ readonly ALPHA_BITS: GLenum;
+ readonly ALWAYS: GLenum;
+ readonly ARRAY_BUFFER: GLenum;
+ readonly ARRAY_BUFFER_BINDING: GLenum;
+ readonly ATTACHED_SHADERS: GLenum;
+ readonly BACK: GLenum;
+ readonly BLEND: GLenum;
+ readonly BLEND_COLOR: GLenum;
+ readonly BLEND_DST_ALPHA: GLenum;
+ readonly BLEND_DST_RGB: GLenum;
+ readonly BLEND_EQUATION: GLenum;
+ readonly BLEND_EQUATION_ALPHA: GLenum;
+ readonly BLEND_EQUATION_RGB: GLenum;
+ readonly BLEND_SRC_ALPHA: GLenum;
+ readonly BLEND_SRC_RGB: GLenum;
+ readonly BLUE_BITS: GLenum;
+ readonly BOOL: GLenum;
+ readonly BOOL_VEC2: GLenum;
+ readonly BOOL_VEC3: GLenum;
+ readonly BOOL_VEC4: GLenum;
+ readonly BROWSER_DEFAULT_WEBGL: GLenum;
+ readonly BUFFER_SIZE: GLenum;
+ readonly BUFFER_USAGE: GLenum;
+ readonly BYTE: GLenum;
+ readonly CCW: GLenum;
+ readonly CLAMP_TO_EDGE: GLenum;
+ readonly COLOR_ATTACHMENT0: GLenum;
+ readonly COLOR_BUFFER_BIT: GLenum;
+ readonly COLOR_CLEAR_VALUE: GLenum;
+ readonly COLOR_WRITEMASK: GLenum;
+ readonly COMPILE_STATUS: GLenum;
+ readonly COMPRESSED_TEXTURE_FORMATS: GLenum;
+ readonly CONSTANT_ALPHA: GLenum;
+ readonly CONSTANT_COLOR: GLenum;
+ readonly CONTEXT_LOST_WEBGL: GLenum;
+ readonly CULL_FACE: GLenum;
+ readonly CULL_FACE_MODE: GLenum;
+ readonly CURRENT_PROGRAM: GLenum;
+ readonly CURRENT_VERTEX_ATTRIB: GLenum;
+ readonly CW: GLenum;
+ readonly DECR: GLenum;
+ readonly DECR_WRAP: GLenum;
+ readonly DELETE_STATUS: GLenum;
+ readonly DEPTH_ATTACHMENT: GLenum;
+ readonly DEPTH_BITS: GLenum;
+ readonly DEPTH_BUFFER_BIT: GLenum;
+ readonly DEPTH_CLEAR_VALUE: GLenum;
+ readonly DEPTH_COMPONENT: GLenum;
+ readonly DEPTH_COMPONENT16: GLenum;
+ readonly DEPTH_FUNC: GLenum;
+ readonly DEPTH_RANGE: GLenum;
+ readonly DEPTH_STENCIL: GLenum;
+ readonly DEPTH_STENCIL_ATTACHMENT: GLenum;
+ readonly DEPTH_TEST: GLenum;
+ readonly DEPTH_WRITEMASK: GLenum;
+ readonly DITHER: GLenum;
+ readonly DONT_CARE: GLenum;
+ readonly DST_ALPHA: GLenum;
+ readonly DST_COLOR: GLenum;
+ readonly DYNAMIC_DRAW: GLenum;
+ readonly ELEMENT_ARRAY_BUFFER: GLenum;
+ readonly ELEMENT_ARRAY_BUFFER_BINDING: GLenum;
+ readonly EQUAL: GLenum;
+ readonly FASTEST: GLenum;
+ readonly FLOAT: GLenum;
+ readonly FLOAT_MAT2: GLenum;
+ readonly FLOAT_MAT3: GLenum;
+ readonly FLOAT_MAT4: GLenum;
+ readonly FLOAT_VEC2: GLenum;
+ readonly FLOAT_VEC3: GLenum;
+ readonly FLOAT_VEC4: GLenum;
+ readonly FRAGMENT_SHADER: GLenum;
+ readonly FRAMEBUFFER: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: GLenum;
+ readonly FRAMEBUFFER_BINDING: GLenum;
+ readonly FRAMEBUFFER_COMPLETE: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: GLenum;
+ readonly FRAMEBUFFER_UNSUPPORTED: GLenum;
+ readonly FRONT: GLenum;
+ readonly FRONT_AND_BACK: GLenum;
+ readonly FRONT_FACE: GLenum;
+ readonly FUNC_ADD: GLenum;
+ readonly FUNC_REVERSE_SUBTRACT: GLenum;
+ readonly FUNC_SUBTRACT: GLenum;
+ readonly GENERATE_MIPMAP_HINT: GLenum;
+ readonly GEQUAL: GLenum;
+ readonly GREATER: GLenum;
+ readonly GREEN_BITS: GLenum;
+ readonly HIGH_FLOAT: GLenum;
+ readonly HIGH_INT: GLenum;
+ readonly IMPLEMENTATION_COLOR_READ_FORMAT: GLenum;
+ readonly IMPLEMENTATION_COLOR_READ_TYPE: GLenum;
+ readonly INCR: GLenum;
+ readonly INCR_WRAP: GLenum;
+ readonly INT: GLenum;
+ readonly INT_VEC2: GLenum;
+ readonly INT_VEC3: GLenum;
+ readonly INT_VEC4: GLenum;
+ readonly INVALID_ENUM: GLenum;
+ readonly INVALID_FRAMEBUFFER_OPERATION: GLenum;
+ readonly INVALID_OPERATION: GLenum;
+ readonly INVALID_VALUE: GLenum;
+ readonly INVERT: GLenum;
+ readonly KEEP: GLenum;
+ readonly LEQUAL: GLenum;
+ readonly LESS: GLenum;
+ readonly LINEAR: GLenum;
+ readonly LINEAR_MIPMAP_LINEAR: GLenum;
+ readonly LINEAR_MIPMAP_NEAREST: GLenum;
+ readonly LINES: GLenum;
+ readonly LINE_LOOP: GLenum;
+ readonly LINE_STRIP: GLenum;
+ readonly LINE_WIDTH: GLenum;
+ readonly LINK_STATUS: GLenum;
+ readonly LOW_FLOAT: GLenum;
+ readonly LOW_INT: GLenum;
+ readonly LUMINANCE: GLenum;
+ readonly LUMINANCE_ALPHA: GLenum;
+ readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: GLenum;
+ readonly MAX_CUBE_MAP_TEXTURE_SIZE: GLenum;
+ readonly MAX_FRAGMENT_UNIFORM_VECTORS: GLenum;
+ readonly MAX_RENDERBUFFER_SIZE: GLenum;
+ readonly MAX_TEXTURE_IMAGE_UNITS: GLenum;
+ readonly MAX_TEXTURE_SIZE: GLenum;
+ readonly MAX_VARYING_VECTORS: GLenum;
+ readonly MAX_VERTEX_ATTRIBS: GLenum;
+ readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: GLenum;
+ readonly MAX_VERTEX_UNIFORM_VECTORS: GLenum;
+ readonly MAX_VIEWPORT_DIMS: GLenum;
+ readonly MEDIUM_FLOAT: GLenum;
+ readonly MEDIUM_INT: GLenum;
+ readonly MIRRORED_REPEAT: GLenum;
+ readonly NEAREST: GLenum;
+ readonly NEAREST_MIPMAP_LINEAR: GLenum;
+ readonly NEAREST_MIPMAP_NEAREST: GLenum;
+ readonly NEVER: GLenum;
+ readonly NICEST: GLenum;
+ readonly NONE: GLenum;
+ readonly NOTEQUAL: GLenum;
+ readonly NO_ERROR: GLenum;
+ readonly ONE: GLenum;
+ readonly ONE_MINUS_CONSTANT_ALPHA: GLenum;
+ readonly ONE_MINUS_CONSTANT_COLOR: GLenum;
+ readonly ONE_MINUS_DST_ALPHA: GLenum;
+ readonly ONE_MINUS_DST_COLOR: GLenum;
+ readonly ONE_MINUS_SRC_ALPHA: GLenum;
+ readonly ONE_MINUS_SRC_COLOR: GLenum;
+ readonly OUT_OF_MEMORY: GLenum;
+ readonly PACK_ALIGNMENT: GLenum;
+ readonly POINTS: GLenum;
+ readonly POLYGON_OFFSET_FACTOR: GLenum;
+ readonly POLYGON_OFFSET_FILL: GLenum;
+ readonly POLYGON_OFFSET_UNITS: GLenum;
+ readonly RED_BITS: GLenum;
+ readonly RENDERBUFFER: GLenum;
+ readonly RENDERBUFFER_ALPHA_SIZE: GLenum;
+ readonly RENDERBUFFER_BINDING: GLenum;
+ readonly RENDERBUFFER_BLUE_SIZE: GLenum;
+ readonly RENDERBUFFER_DEPTH_SIZE: GLenum;
+ readonly RENDERBUFFER_GREEN_SIZE: GLenum;
+ readonly RENDERBUFFER_HEIGHT: GLenum;
+ readonly RENDERBUFFER_INTERNAL_FORMAT: GLenum;
+ readonly RENDERBUFFER_RED_SIZE: GLenum;
+ readonly RENDERBUFFER_STENCIL_SIZE: GLenum;
+ readonly RENDERBUFFER_WIDTH: GLenum;
+ readonly RENDERER: GLenum;
+ readonly REPEAT: GLenum;
+ readonly REPLACE: GLenum;
+ readonly RGB: GLenum;
+ readonly RGB565: GLenum;
+ readonly RGB5_A1: GLenum;
+ readonly RGBA: GLenum;
+ readonly RGBA4: GLenum;
+ readonly SAMPLER_2D: GLenum;
+ readonly SAMPLER_CUBE: GLenum;
+ readonly SAMPLES: GLenum;
+ readonly SAMPLE_ALPHA_TO_COVERAGE: GLenum;
+ readonly SAMPLE_BUFFERS: GLenum;
+ readonly SAMPLE_COVERAGE: GLenum;
+ readonly SAMPLE_COVERAGE_INVERT: GLenum;
+ readonly SAMPLE_COVERAGE_VALUE: GLenum;
+ readonly SCISSOR_BOX: GLenum;
+ readonly SCISSOR_TEST: GLenum;
+ readonly SHADER_TYPE: GLenum;
+ readonly SHADING_LANGUAGE_VERSION: GLenum;
+ readonly SHORT: GLenum;
+ readonly SRC_ALPHA: GLenum;
+ readonly SRC_ALPHA_SATURATE: GLenum;
+ readonly SRC_COLOR: GLenum;
+ readonly STATIC_DRAW: GLenum;
+ readonly STENCIL_ATTACHMENT: GLenum;
+ readonly STENCIL_BACK_FAIL: GLenum;
+ readonly STENCIL_BACK_FUNC: GLenum;
+ readonly STENCIL_BACK_PASS_DEPTH_FAIL: GLenum;
+ readonly STENCIL_BACK_PASS_DEPTH_PASS: GLenum;
+ readonly STENCIL_BACK_REF: GLenum;
+ readonly STENCIL_BACK_VALUE_MASK: GLenum;
+ readonly STENCIL_BACK_WRITEMASK: GLenum;
+ readonly STENCIL_BITS: GLenum;
+ readonly STENCIL_BUFFER_BIT: GLenum;
+ readonly STENCIL_CLEAR_VALUE: GLenum;
+ readonly STENCIL_FAIL: GLenum;
+ readonly STENCIL_FUNC: GLenum;
+ readonly STENCIL_INDEX8: GLenum;
+ readonly STENCIL_PASS_DEPTH_FAIL: GLenum;
+ readonly STENCIL_PASS_DEPTH_PASS: GLenum;
+ readonly STENCIL_REF: GLenum;
+ readonly STENCIL_TEST: GLenum;
+ readonly STENCIL_VALUE_MASK: GLenum;
+ readonly STENCIL_WRITEMASK: GLenum;
+ readonly STREAM_DRAW: GLenum;
+ readonly SUBPIXEL_BITS: GLenum;
+ readonly TEXTURE: GLenum;
+ readonly TEXTURE0: GLenum;
+ readonly TEXTURE1: GLenum;
+ readonly TEXTURE10: GLenum;
+ readonly TEXTURE11: GLenum;
+ readonly TEXTURE12: GLenum;
+ readonly TEXTURE13: GLenum;
+ readonly TEXTURE14: GLenum;
+ readonly TEXTURE15: GLenum;
+ readonly TEXTURE16: GLenum;
+ readonly TEXTURE17: GLenum;
+ readonly TEXTURE18: GLenum;
+ readonly TEXTURE19: GLenum;
+ readonly TEXTURE2: GLenum;
+ readonly TEXTURE20: GLenum;
+ readonly TEXTURE21: GLenum;
+ readonly TEXTURE22: GLenum;
+ readonly TEXTURE23: GLenum;
+ readonly TEXTURE24: GLenum;
+ readonly TEXTURE25: GLenum;
+ readonly TEXTURE26: GLenum;
+ readonly TEXTURE27: GLenum;
+ readonly TEXTURE28: GLenum;
+ readonly TEXTURE29: GLenum;
+ readonly TEXTURE3: GLenum;
+ readonly TEXTURE30: GLenum;
+ readonly TEXTURE31: GLenum;
+ readonly TEXTURE4: GLenum;
+ readonly TEXTURE5: GLenum;
+ readonly TEXTURE6: GLenum;
+ readonly TEXTURE7: GLenum;
+ readonly TEXTURE8: GLenum;
+ readonly TEXTURE9: GLenum;
+ readonly TEXTURE_2D: GLenum;
+ readonly TEXTURE_BINDING_2D: GLenum;
+ readonly TEXTURE_BINDING_CUBE_MAP: GLenum;
+ readonly TEXTURE_CUBE_MAP: GLenum;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_X: GLenum;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: GLenum;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: GLenum;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_X: GLenum;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_Y: GLenum;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_Z: GLenum;
+ readonly TEXTURE_MAG_FILTER: GLenum;
+ readonly TEXTURE_MIN_FILTER: GLenum;
+ readonly TEXTURE_WRAP_S: GLenum;
+ readonly TEXTURE_WRAP_T: GLenum;
+ readonly TRIANGLES: GLenum;
+ readonly TRIANGLE_FAN: GLenum;
+ readonly TRIANGLE_STRIP: GLenum;
+ readonly UNPACK_ALIGNMENT: GLenum;
+ readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: GLenum;
+ readonly UNPACK_FLIP_Y_WEBGL: GLenum;
+ readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: GLenum;
+ readonly UNSIGNED_BYTE: GLenum;
+ readonly UNSIGNED_INT: GLenum;
+ readonly UNSIGNED_SHORT: GLenum;
+ readonly UNSIGNED_SHORT_4_4_4_4: GLenum;
+ readonly UNSIGNED_SHORT_5_5_5_1: GLenum;
+ readonly UNSIGNED_SHORT_5_6_5: GLenum;
+ readonly VALIDATE_STATUS: GLenum;
+ readonly VENDOR: GLenum;
+ readonly VERSION: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_ENABLED: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_POINTER: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_SIZE: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_STRIDE: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_TYPE: GLenum;
+ readonly VERTEX_SHADER: GLenum;
+ readonly VIEWPORT: GLenum;
+ readonly ZERO: GLenum;
+};
+
+interface WebGLRenderingContextBase {
+ readonly canvas: HTMLCanvasElement | OffscreenCanvas;
+ readonly drawingBufferHeight: GLsizei;
+ readonly drawingBufferWidth: GLsizei;
+ activeTexture(texture: GLenum): void;
+ attachShader(program: WebGLProgram, shader: WebGLShader): void;
+ bindAttribLocation(program: WebGLProgram, index: GLuint, name: string): void;
+ bindBuffer(target: GLenum, buffer: WebGLBuffer | null): void;
+ bindFramebuffer(target: GLenum, framebuffer: WebGLFramebuffer | null): void;
+ bindRenderbuffer(target: GLenum, renderbuffer: WebGLRenderbuffer | null): void;
+ bindTexture(target: GLenum, texture: WebGLTexture | null): void;
+ blendColor(red: GLclampf, green: GLclampf, blue: GLclampf, alpha: GLclampf): void;
+ blendEquation(mode: GLenum): void;
+ blendEquationSeparate(modeRGB: GLenum, modeAlpha: GLenum): void;
+ blendFunc(sfactor: GLenum, dfactor: GLenum): void;
+ blendFuncSeparate(srcRGB: GLenum, dstRGB: GLenum, srcAlpha: GLenum, dstAlpha: GLenum): void;
+ checkFramebufferStatus(target: GLenum): GLenum;
+ clear(mask: GLbitfield): void;
+ clearColor(red: GLclampf, green: GLclampf, blue: GLclampf, alpha: GLclampf): void;
+ clearDepth(depth: GLclampf): void;
+ clearStencil(s: GLint): void;
+ colorMask(red: GLboolean, green: GLboolean, blue: GLboolean, alpha: GLboolean): void;
+ compileShader(shader: WebGLShader): void;
+ copyTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, x: GLint, y: GLint, width: GLsizei, height: GLsizei, border: GLint): void;
+ copyTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
+ createBuffer(): WebGLBuffer | null;
+ createFramebuffer(): WebGLFramebuffer | null;
+ createProgram(): WebGLProgram | null;
+ createRenderbuffer(): WebGLRenderbuffer | null;
+ createShader(type: GLenum): WebGLShader | null;
+ createTexture(): WebGLTexture | null;
+ cullFace(mode: GLenum): void;
+ deleteBuffer(buffer: WebGLBuffer | null): void;
+ deleteFramebuffer(framebuffer: WebGLFramebuffer | null): void;
+ deleteProgram(program: WebGLProgram | null): void;
+ deleteRenderbuffer(renderbuffer: WebGLRenderbuffer | null): void;
+ deleteShader(shader: WebGLShader | null): void;
+ deleteTexture(texture: WebGLTexture | null): void;
+ depthFunc(func: GLenum): void;
+ depthMask(flag: GLboolean): void;
+ depthRange(zNear: GLclampf, zFar: GLclampf): void;
+ detachShader(program: WebGLProgram, shader: WebGLShader): void;
+ disable(cap: GLenum): void;
+ disableVertexAttribArray(index: GLuint): void;
+ drawArrays(mode: GLenum, first: GLint, count: GLsizei): void;
+ drawElements(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr): void;
+ enable(cap: GLenum): void;
+ enableVertexAttribArray(index: GLuint): void;
+ finish(): void;
+ flush(): void;
+ framebufferRenderbuffer(target: GLenum, attachment: GLenum, renderbuffertarget: GLenum, renderbuffer: WebGLRenderbuffer | null): void;
+ framebufferTexture2D(target: GLenum, attachment: GLenum, textarget: GLenum, texture: WebGLTexture | null, level: GLint): void;
+ frontFace(mode: GLenum): void;
+ generateMipmap(target: GLenum): void;
+ getActiveAttrib(program: WebGLProgram, index: GLuint): WebGLActiveInfo | null;
+ getActiveUniform(program: WebGLProgram, index: GLuint): WebGLActiveInfo | null;
+ getAttachedShaders(program: WebGLProgram): WebGLShader[] | null;
+ getAttribLocation(program: WebGLProgram, name: string): GLint;
+ getBufferParameter(target: GLenum, pname: GLenum): any;
+ getContextAttributes(): WebGLContextAttributes | null;
+ getError(): GLenum;
+ getExtension(extensionName: "EXT_blend_minmax"): EXT_blend_minmax | null;
+ getExtension(extensionName: "EXT_texture_filter_anisotropic"): EXT_texture_filter_anisotropic | null;
+ getExtension(extensionName: "EXT_frag_depth"): EXT_frag_depth | null;
+ getExtension(extensionName: "EXT_shader_texture_lod"): EXT_shader_texture_lod | null;
+ getExtension(extensionName: "EXT_sRGB"): EXT_sRGB | null;
+ getExtension(extensionName: "OES_vertex_array_object"): OES_vertex_array_object | null;
+ getExtension(extensionName: "WEBGL_color_buffer_float"): WEBGL_color_buffer_float | null;
+ getExtension(extensionName: "WEBGL_compressed_texture_astc"): WEBGL_compressed_texture_astc | null;
+ getExtension(extensionName: "WEBGL_compressed_texture_s3tc_srgb"): WEBGL_compressed_texture_s3tc_srgb | null;
+ getExtension(extensionName: "WEBGL_debug_shaders"): WEBGL_debug_shaders | null;
+ getExtension(extensionName: "WEBGL_draw_buffers"): WEBGL_draw_buffers | null;
+ getExtension(extensionName: "WEBGL_lose_context"): WEBGL_lose_context | null;
+ getExtension(extensionName: "WEBGL_depth_texture"): WEBGL_depth_texture | null;
+ getExtension(extensionName: "WEBGL_debug_renderer_info"): WEBGL_debug_renderer_info | null;
+ getExtension(extensionName: "WEBGL_compressed_texture_s3tc"): WEBGL_compressed_texture_s3tc | null;
+ getExtension(extensionName: "OES_texture_half_float_linear"): OES_texture_half_float_linear | null;
+ getExtension(extensionName: "OES_texture_half_float"): OES_texture_half_float | null;
+ getExtension(extensionName: "OES_texture_float_linear"): OES_texture_float_linear | null;
+ getExtension(extensionName: "OES_texture_float"): OES_texture_float | null;
+ getExtension(extensionName: "OES_standard_derivatives"): OES_standard_derivatives | null;
+ getExtension(extensionName: "OES_element_index_uint"): OES_element_index_uint | null;
+ getExtension(extensionName: "ANGLE_instanced_arrays"): ANGLE_instanced_arrays | null;
+ getExtension(extensionName: string): any;
+ getFramebufferAttachmentParameter(target: GLenum, attachment: GLenum, pname: GLenum): any;
+ getParameter(pname: GLenum): any;
+ getProgramInfoLog(program: WebGLProgram): string | null;
+ getProgramParameter(program: WebGLProgram, pname: GLenum): any;
+ getRenderbufferParameter(target: GLenum, pname: GLenum): any;
+ getShaderInfoLog(shader: WebGLShader): string | null;
+ getShaderParameter(shader: WebGLShader, pname: GLenum): any;
+ getShaderPrecisionFormat(shadertype: GLenum, precisiontype: GLenum): WebGLShaderPrecisionFormat | null;
+ getShaderSource(shader: WebGLShader): string | null;
+ getSupportedExtensions(): string[] | null;
+ getTexParameter(target: GLenum, pname: GLenum): any;
+ getUniform(program: WebGLProgram, location: WebGLUniformLocation): any;
+ getUniformLocation(program: WebGLProgram, name: string): WebGLUniformLocation | null;
+ getVertexAttrib(index: GLuint, pname: GLenum): any;
+ getVertexAttribOffset(index: GLuint, pname: GLenum): GLintptr;
+ hint(target: GLenum, mode: GLenum): void;
+ isBuffer(buffer: WebGLBuffer | null): GLboolean;
+ isContextLost(): boolean;
+ isEnabled(cap: GLenum): GLboolean;
+ isFramebuffer(framebuffer: WebGLFramebuffer | null): GLboolean;
+ isProgram(program: WebGLProgram | null): GLboolean;
+ isRenderbuffer(renderbuffer: WebGLRenderbuffer | null): GLboolean;
+ isShader(shader: WebGLShader | null): GLboolean;
+ isTexture(texture: WebGLTexture | null): GLboolean;
+ lineWidth(width: GLfloat): void;
+ linkProgram(program: WebGLProgram): void;
+ pixelStorei(pname: GLenum, param: GLint | GLboolean): void;
+ polygonOffset(factor: GLfloat, units: GLfloat): void;
+ renderbufferStorage(target: GLenum, internalformat: GLenum, width: GLsizei, height: GLsizei): void;
+ sampleCoverage(value: GLclampf, invert: GLboolean): void;
+ scissor(x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
+ shaderSource(shader: WebGLShader, source: string): void;
+ stencilFunc(func: GLenum, ref: GLint, mask: GLuint): void;
+ stencilFuncSeparate(face: GLenum, func: GLenum, ref: GLint, mask: GLuint): void;
+ stencilMask(mask: GLuint): void;
+ stencilMaskSeparate(face: GLenum, mask: GLuint): void;
+ stencilOp(fail: GLenum, zfail: GLenum, zpass: GLenum): void;
+ stencilOpSeparate(face: GLenum, fail: GLenum, zfail: GLenum, zpass: GLenum): void;
+ texParameterf(target: GLenum, pname: GLenum, param: GLfloat): void;
+ texParameteri(target: GLenum, pname: GLenum, param: GLint): void;
+ uniform1f(location: WebGLUniformLocation | null, x: GLfloat): void;
+ uniform1i(location: WebGLUniformLocation | null, x: GLint): void;
+ uniform2f(location: WebGLUniformLocation | null, x: GLfloat, y: GLfloat): void;
+ uniform2i(location: WebGLUniformLocation | null, x: GLint, y: GLint): void;
+ uniform3f(location: WebGLUniformLocation | null, x: GLfloat, y: GLfloat, z: GLfloat): void;
+ uniform3i(location: WebGLUniformLocation | null, x: GLint, y: GLint, z: GLint): void;
+ uniform4f(location: WebGLUniformLocation | null, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat): void;
+ uniform4i(location: WebGLUniformLocation | null, x: GLint, y: GLint, z: GLint, w: GLint): void;
+ useProgram(program: WebGLProgram | null): void;
+ validateProgram(program: WebGLProgram): void;
+ vertexAttrib1f(index: GLuint, x: GLfloat): void;
+ vertexAttrib1fv(index: GLuint, values: Float32List): void;
+ vertexAttrib2f(index: GLuint, x: GLfloat, y: GLfloat): void;
+ vertexAttrib2fv(index: GLuint, values: Float32List): void;
+ vertexAttrib3f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat): void;
+ vertexAttrib3fv(index: GLuint, values: Float32List): void;
+ vertexAttrib4f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat): void;
+ vertexAttrib4fv(index: GLuint, values: Float32List): void;
+ vertexAttribPointer(index: GLuint, size: GLint, type: GLenum, normalized: GLboolean, stride: GLsizei, offset: GLintptr): void;
+ viewport(x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
+ readonly ACTIVE_ATTRIBUTES: GLenum;
+ readonly ACTIVE_TEXTURE: GLenum;
+ readonly ACTIVE_UNIFORMS: GLenum;
+ readonly ALIASED_LINE_WIDTH_RANGE: GLenum;
+ readonly ALIASED_POINT_SIZE_RANGE: GLenum;
+ readonly ALPHA: GLenum;
+ readonly ALPHA_BITS: GLenum;
+ readonly ALWAYS: GLenum;
+ readonly ARRAY_BUFFER: GLenum;
+ readonly ARRAY_BUFFER_BINDING: GLenum;
+ readonly ATTACHED_SHADERS: GLenum;
+ readonly BACK: GLenum;
+ readonly BLEND: GLenum;
+ readonly BLEND_COLOR: GLenum;
+ readonly BLEND_DST_ALPHA: GLenum;
+ readonly BLEND_DST_RGB: GLenum;
+ readonly BLEND_EQUATION: GLenum;
+ readonly BLEND_EQUATION_ALPHA: GLenum;
+ readonly BLEND_EQUATION_RGB: GLenum;
+ readonly BLEND_SRC_ALPHA: GLenum;
+ readonly BLEND_SRC_RGB: GLenum;
+ readonly BLUE_BITS: GLenum;
+ readonly BOOL: GLenum;
+ readonly BOOL_VEC2: GLenum;
+ readonly BOOL_VEC3: GLenum;
+ readonly BOOL_VEC4: GLenum;
+ readonly BROWSER_DEFAULT_WEBGL: GLenum;
+ readonly BUFFER_SIZE: GLenum;
+ readonly BUFFER_USAGE: GLenum;
+ readonly BYTE: GLenum;
+ readonly CCW: GLenum;
+ readonly CLAMP_TO_EDGE: GLenum;
+ readonly COLOR_ATTACHMENT0: GLenum;
+ readonly COLOR_BUFFER_BIT: GLenum;
+ readonly COLOR_CLEAR_VALUE: GLenum;
+ readonly COLOR_WRITEMASK: GLenum;
+ readonly COMPILE_STATUS: GLenum;
+ readonly COMPRESSED_TEXTURE_FORMATS: GLenum;
+ readonly CONSTANT_ALPHA: GLenum;
+ readonly CONSTANT_COLOR: GLenum;
+ readonly CONTEXT_LOST_WEBGL: GLenum;
+ readonly CULL_FACE: GLenum;
+ readonly CULL_FACE_MODE: GLenum;
+ readonly CURRENT_PROGRAM: GLenum;
+ readonly CURRENT_VERTEX_ATTRIB: GLenum;
+ readonly CW: GLenum;
+ readonly DECR: GLenum;
+ readonly DECR_WRAP: GLenum;
+ readonly DELETE_STATUS: GLenum;
+ readonly DEPTH_ATTACHMENT: GLenum;
+ readonly DEPTH_BITS: GLenum;
+ readonly DEPTH_BUFFER_BIT: GLenum;
+ readonly DEPTH_CLEAR_VALUE: GLenum;
+ readonly DEPTH_COMPONENT: GLenum;
+ readonly DEPTH_COMPONENT16: GLenum;
+ readonly DEPTH_FUNC: GLenum;
+ readonly DEPTH_RANGE: GLenum;
+ readonly DEPTH_STENCIL: GLenum;
+ readonly DEPTH_STENCIL_ATTACHMENT: GLenum;
+ readonly DEPTH_TEST: GLenum;
+ readonly DEPTH_WRITEMASK: GLenum;
+ readonly DITHER: GLenum;
+ readonly DONT_CARE: GLenum;
+ readonly DST_ALPHA: GLenum;
+ readonly DST_COLOR: GLenum;
+ readonly DYNAMIC_DRAW: GLenum;
+ readonly ELEMENT_ARRAY_BUFFER: GLenum;
+ readonly ELEMENT_ARRAY_BUFFER_BINDING: GLenum;
+ readonly EQUAL: GLenum;
+ readonly FASTEST: GLenum;
+ readonly FLOAT: GLenum;
+ readonly FLOAT_MAT2: GLenum;
+ readonly FLOAT_MAT3: GLenum;
+ readonly FLOAT_MAT4: GLenum;
+ readonly FLOAT_VEC2: GLenum;
+ readonly FLOAT_VEC3: GLenum;
+ readonly FLOAT_VEC4: GLenum;
+ readonly FRAGMENT_SHADER: GLenum;
+ readonly FRAMEBUFFER: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: GLenum;
+ readonly FRAMEBUFFER_BINDING: GLenum;
+ readonly FRAMEBUFFER_COMPLETE: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: GLenum;
+ readonly FRAMEBUFFER_UNSUPPORTED: GLenum;
+ readonly FRONT: GLenum;
+ readonly FRONT_AND_BACK: GLenum;
+ readonly FRONT_FACE: GLenum;
+ readonly FUNC_ADD: GLenum;
+ readonly FUNC_REVERSE_SUBTRACT: GLenum;
+ readonly FUNC_SUBTRACT: GLenum;
+ readonly GENERATE_MIPMAP_HINT: GLenum;
+ readonly GEQUAL: GLenum;
+ readonly GREATER: GLenum;
+ readonly GREEN_BITS: GLenum;
+ readonly HIGH_FLOAT: GLenum;
+ readonly HIGH_INT: GLenum;
+ readonly IMPLEMENTATION_COLOR_READ_FORMAT: GLenum;
+ readonly IMPLEMENTATION_COLOR_READ_TYPE: GLenum;
+ readonly INCR: GLenum;
+ readonly INCR_WRAP: GLenum;
+ readonly INT: GLenum;
+ readonly INT_VEC2: GLenum;
+ readonly INT_VEC3: GLenum;
+ readonly INT_VEC4: GLenum;
+ readonly INVALID_ENUM: GLenum;
+ readonly INVALID_FRAMEBUFFER_OPERATION: GLenum;
+ readonly INVALID_OPERATION: GLenum;
+ readonly INVALID_VALUE: GLenum;
+ readonly INVERT: GLenum;
+ readonly KEEP: GLenum;
+ readonly LEQUAL: GLenum;
+ readonly LESS: GLenum;
+ readonly LINEAR: GLenum;
+ readonly LINEAR_MIPMAP_LINEAR: GLenum;
+ readonly LINEAR_MIPMAP_NEAREST: GLenum;
+ readonly LINES: GLenum;
+ readonly LINE_LOOP: GLenum;
+ readonly LINE_STRIP: GLenum;
+ readonly LINE_WIDTH: GLenum;
+ readonly LINK_STATUS: GLenum;
+ readonly LOW_FLOAT: GLenum;
+ readonly LOW_INT: GLenum;
+ readonly LUMINANCE: GLenum;
+ readonly LUMINANCE_ALPHA: GLenum;
+ readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: GLenum;
+ readonly MAX_CUBE_MAP_TEXTURE_SIZE: GLenum;
+ readonly MAX_FRAGMENT_UNIFORM_VECTORS: GLenum;
+ readonly MAX_RENDERBUFFER_SIZE: GLenum;
+ readonly MAX_TEXTURE_IMAGE_UNITS: GLenum;
+ readonly MAX_TEXTURE_SIZE: GLenum;
+ readonly MAX_VARYING_VECTORS: GLenum;
+ readonly MAX_VERTEX_ATTRIBS: GLenum;
+ readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: GLenum;
+ readonly MAX_VERTEX_UNIFORM_VECTORS: GLenum;
+ readonly MAX_VIEWPORT_DIMS: GLenum;
+ readonly MEDIUM_FLOAT: GLenum;
+ readonly MEDIUM_INT: GLenum;
+ readonly MIRRORED_REPEAT: GLenum;
+ readonly NEAREST: GLenum;
+ readonly NEAREST_MIPMAP_LINEAR: GLenum;
+ readonly NEAREST_MIPMAP_NEAREST: GLenum;
+ readonly NEVER: GLenum;
+ readonly NICEST: GLenum;
+ readonly NONE: GLenum;
+ readonly NOTEQUAL: GLenum;
+ readonly NO_ERROR: GLenum;
+ readonly ONE: GLenum;
+ readonly ONE_MINUS_CONSTANT_ALPHA: GLenum;
+ readonly ONE_MINUS_CONSTANT_COLOR: GLenum;
+ readonly ONE_MINUS_DST_ALPHA: GLenum;
+ readonly ONE_MINUS_DST_COLOR: GLenum;
+ readonly ONE_MINUS_SRC_ALPHA: GLenum;
+ readonly ONE_MINUS_SRC_COLOR: GLenum;
+ readonly OUT_OF_MEMORY: GLenum;
+ readonly PACK_ALIGNMENT: GLenum;
+ readonly POINTS: GLenum;
+ readonly POLYGON_OFFSET_FACTOR: GLenum;
+ readonly POLYGON_OFFSET_FILL: GLenum;
+ readonly POLYGON_OFFSET_UNITS: GLenum;
+ readonly RED_BITS: GLenum;
+ readonly RENDERBUFFER: GLenum;
+ readonly RENDERBUFFER_ALPHA_SIZE: GLenum;
+ readonly RENDERBUFFER_BINDING: GLenum;
+ readonly RENDERBUFFER_BLUE_SIZE: GLenum;
+ readonly RENDERBUFFER_DEPTH_SIZE: GLenum;
+ readonly RENDERBUFFER_GREEN_SIZE: GLenum;
+ readonly RENDERBUFFER_HEIGHT: GLenum;
+ readonly RENDERBUFFER_INTERNAL_FORMAT: GLenum;
+ readonly RENDERBUFFER_RED_SIZE: GLenum;
+ readonly RENDERBUFFER_STENCIL_SIZE: GLenum;
+ readonly RENDERBUFFER_WIDTH: GLenum;
+ readonly RENDERER: GLenum;
+ readonly REPEAT: GLenum;
+ readonly REPLACE: GLenum;
+ readonly RGB: GLenum;
+ readonly RGB565: GLenum;
+ readonly RGB5_A1: GLenum;
+ readonly RGBA: GLenum;
+ readonly RGBA4: GLenum;
+ readonly SAMPLER_2D: GLenum;
+ readonly SAMPLER_CUBE: GLenum;
+ readonly SAMPLES: GLenum;
+ readonly SAMPLE_ALPHA_TO_COVERAGE: GLenum;
+ readonly SAMPLE_BUFFERS: GLenum;
+ readonly SAMPLE_COVERAGE: GLenum;
+ readonly SAMPLE_COVERAGE_INVERT: GLenum;
+ readonly SAMPLE_COVERAGE_VALUE: GLenum;
+ readonly SCISSOR_BOX: GLenum;
+ readonly SCISSOR_TEST: GLenum;
+ readonly SHADER_TYPE: GLenum;
+ readonly SHADING_LANGUAGE_VERSION: GLenum;
+ readonly SHORT: GLenum;
+ readonly SRC_ALPHA: GLenum;
+ readonly SRC_ALPHA_SATURATE: GLenum;
+ readonly SRC_COLOR: GLenum;
+ readonly STATIC_DRAW: GLenum;
+ readonly STENCIL_ATTACHMENT: GLenum;
+ readonly STENCIL_BACK_FAIL: GLenum;
+ readonly STENCIL_BACK_FUNC: GLenum;
+ readonly STENCIL_BACK_PASS_DEPTH_FAIL: GLenum;
+ readonly STENCIL_BACK_PASS_DEPTH_PASS: GLenum;
+ readonly STENCIL_BACK_REF: GLenum;
+ readonly STENCIL_BACK_VALUE_MASK: GLenum;
+ readonly STENCIL_BACK_WRITEMASK: GLenum;
+ readonly STENCIL_BITS: GLenum;
+ readonly STENCIL_BUFFER_BIT: GLenum;
+ readonly STENCIL_CLEAR_VALUE: GLenum;
+ readonly STENCIL_FAIL: GLenum;
+ readonly STENCIL_FUNC: GLenum;
+ readonly STENCIL_INDEX8: GLenum;
+ readonly STENCIL_PASS_DEPTH_FAIL: GLenum;
+ readonly STENCIL_PASS_DEPTH_PASS: GLenum;
+ readonly STENCIL_REF: GLenum;
+ readonly STENCIL_TEST: GLenum;
+ readonly STENCIL_VALUE_MASK: GLenum;
+ readonly STENCIL_WRITEMASK: GLenum;
+ readonly STREAM_DRAW: GLenum;
+ readonly SUBPIXEL_BITS: GLenum;
+ readonly TEXTURE: GLenum;
+ readonly TEXTURE0: GLenum;
+ readonly TEXTURE1: GLenum;
+ readonly TEXTURE10: GLenum;
+ readonly TEXTURE11: GLenum;
+ readonly TEXTURE12: GLenum;
+ readonly TEXTURE13: GLenum;
+ readonly TEXTURE14: GLenum;
+ readonly TEXTURE15: GLenum;
+ readonly TEXTURE16: GLenum;
+ readonly TEXTURE17: GLenum;
+ readonly TEXTURE18: GLenum;
+ readonly TEXTURE19: GLenum;
+ readonly TEXTURE2: GLenum;
+ readonly TEXTURE20: GLenum;
+ readonly TEXTURE21: GLenum;
+ readonly TEXTURE22: GLenum;
+ readonly TEXTURE23: GLenum;
+ readonly TEXTURE24: GLenum;
+ readonly TEXTURE25: GLenum;
+ readonly TEXTURE26: GLenum;
+ readonly TEXTURE27: GLenum;
+ readonly TEXTURE28: GLenum;
+ readonly TEXTURE29: GLenum;
+ readonly TEXTURE3: GLenum;
+ readonly TEXTURE30: GLenum;
+ readonly TEXTURE31: GLenum;
+ readonly TEXTURE4: GLenum;
+ readonly TEXTURE5: GLenum;
+ readonly TEXTURE6: GLenum;
+ readonly TEXTURE7: GLenum;
+ readonly TEXTURE8: GLenum;
+ readonly TEXTURE9: GLenum;
+ readonly TEXTURE_2D: GLenum;
+ readonly TEXTURE_BINDING_2D: GLenum;
+ readonly TEXTURE_BINDING_CUBE_MAP: GLenum;
+ readonly TEXTURE_CUBE_MAP: GLenum;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_X: GLenum;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: GLenum;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: GLenum;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_X: GLenum;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_Y: GLenum;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_Z: GLenum;
+ readonly TEXTURE_MAG_FILTER: GLenum;
+ readonly TEXTURE_MIN_FILTER: GLenum;
+ readonly TEXTURE_WRAP_S: GLenum;
+ readonly TEXTURE_WRAP_T: GLenum;
+ readonly TRIANGLES: GLenum;
+ readonly TRIANGLE_FAN: GLenum;
+ readonly TRIANGLE_STRIP: GLenum;
+ readonly UNPACK_ALIGNMENT: GLenum;
+ readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: GLenum;
+ readonly UNPACK_FLIP_Y_WEBGL: GLenum;
+ readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: GLenum;
+ readonly UNSIGNED_BYTE: GLenum;
+ readonly UNSIGNED_INT: GLenum;
+ readonly UNSIGNED_SHORT: GLenum;
+ readonly UNSIGNED_SHORT_4_4_4_4: GLenum;
+ readonly UNSIGNED_SHORT_5_5_5_1: GLenum;
+ readonly UNSIGNED_SHORT_5_6_5: GLenum;
+ readonly VALIDATE_STATUS: GLenum;
+ readonly VENDOR: GLenum;
+ readonly VERSION: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_ENABLED: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_POINTER: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_SIZE: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_STRIDE: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_TYPE: GLenum;
+ readonly VERTEX_SHADER: GLenum;
+ readonly VIEWPORT: GLenum;
+ readonly ZERO: GLenum;
+}
+
+interface WebGLRenderingContextOverloads {
+ bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum): void;
+ bufferData(target: GLenum, data: BufferSource | null, usage: GLenum): void;
+ bufferSubData(target: GLenum, offset: GLintptr, data: BufferSource): void;
+ compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, data: ArrayBufferView): void;
+ compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, data: ArrayBufferView): void;
+ readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
+ texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
+ texImage2D(target: GLenum, level: GLint, internalformat: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
+ texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
+ texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
+ uniform1fv(location: WebGLUniformLocation | null, v: Float32List): void;
+ uniform1iv(location: WebGLUniformLocation | null, v: Int32List): void;
+ uniform2fv(location: WebGLUniformLocation | null, v: Float32List): void;
+ uniform2iv(location: WebGLUniformLocation | null, v: Int32List): void;
+ uniform3fv(location: WebGLUniformLocation | null, v: Float32List): void;
+ uniform3iv(location: WebGLUniformLocation | null, v: Int32List): void;
+ uniform4fv(location: WebGLUniformLocation | null, v: Float32List): void;
+ uniform4iv(location: WebGLUniformLocation | null, v: Int32List): void;
+ uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void;
+ uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void;
+ uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void;
+}
+
+interface WebGLSampler extends WebGLObject {
+}
+
+declare var WebGLSampler: {
+ prototype: WebGLSampler;
+ new(): WebGLSampler;
+};
+
+/** The WebGLShader is part of the WebGL API and can either be a vertex or a fragment shader. A WebGLProgram requires both types of shaders. */
+interface WebGLShader extends WebGLObject {
+}
+
+declare var WebGLShader: {
+ prototype: WebGLShader;
+ new(): WebGLShader;
+};
+
+/** Part of the WebGL API and represents the information returned by calling the WebGLRenderingContext.getShaderPrecisionFormat() method. */
+interface WebGLShaderPrecisionFormat {
+ readonly precision: GLint;
+ readonly rangeMax: GLint;
+ readonly rangeMin: GLint;
+}
+
+declare var WebGLShaderPrecisionFormat: {
+ prototype: WebGLShaderPrecisionFormat;
+ new(): WebGLShaderPrecisionFormat;
+};
+
+interface WebGLSync extends WebGLObject {
+}
+
+declare var WebGLSync: {
+ prototype: WebGLSync;
+ new(): WebGLSync;
+};
+
+/** Part of the WebGL API and represents an opaque texture object providing storage and state for texturing operations. */
+interface WebGLTexture extends WebGLObject {
+}
+
+declare var WebGLTexture: {
+ prototype: WebGLTexture;
+ new(): WebGLTexture;
+};
+
+interface WebGLTransformFeedback extends WebGLObject {
+}
+
+declare var WebGLTransformFeedback: {
+ prototype: WebGLTransformFeedback;
+ new(): WebGLTransformFeedback;
+};
+
+/** Part of the WebGL API and represents the location of a uniform variable in a shader program. */
+interface WebGLUniformLocation {
+}
+
+declare var WebGLUniformLocation: {
+ prototype: WebGLUniformLocation;
+ new(): WebGLUniformLocation;
+};
+
+interface WebGLVertexArrayObject extends WebGLObject {
+}
+
+declare var WebGLVertexArrayObject: {
+ prototype: WebGLVertexArrayObject;
+ new(): WebGLVertexArrayObject;
+};
+
+interface WebGLVertexArrayObjectOES extends WebGLObject {
+}
+
+interface WebKitPoint {
+ x: number;
+ y: number;
+}
+
+declare var WebKitPoint: {
+ prototype: WebKitPoint;
+ new(x?: number, y?: number): WebKitPoint;
+};
+
+interface WebSocketEventMap {
+ "close": CloseEvent;
+ "error": Event;
+ "message": MessageEvent;
+ "open": Event;
+}
+
+/** Provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection. */
+interface WebSocket extends EventTarget {
+ /**
+ * Returns a string that indicates how binary data from the WebSocket object is exposed to scripts:
+ *
+ * Can be set, to change how binary data is returned. The default is "blob".
+ */
+ binaryType: BinaryType;
+ /**
+ * Returns the number of bytes of application data (UTF-8 text and binary data) that have been queued using send() but not yet been transmitted to the network.
+ *
+ * If the WebSocket connection is closed, this attribute's value will only increase with each call to the send() method. (The number does not reset to zero once the connection closes.)
+ */
+ readonly bufferedAmount: number;
+ /**
+ * Returns the extensions selected by the server, if any.
+ */
+ readonly extensions: string;
+ onclose: ((this: WebSocket, ev: CloseEvent) => any) | null;
+ onerror: ((this: WebSocket, ev: Event) => any) | null;
+ onmessage: ((this: WebSocket, ev: MessageEvent) => any) | null;
+ onopen: ((this: WebSocket, ev: Event) => any) | null;
+ /**
+ * Returns the subprotocol selected by the server, if any. It can be used in conjunction with the array form of the constructor's second argument to perform subprotocol negotiation.
+ */
+ readonly protocol: string;
+ /**
+ * Returns the state of the WebSocket object's connection. It can have the values described below.
+ */
+ readonly readyState: number;
+ /**
+ * Returns the URL that was used to establish the WebSocket connection.
+ */
+ readonly url: string;
+ /**
+ * Closes the WebSocket connection, optionally using code as the the WebSocket connection close code and reason as the the WebSocket connection close reason.
+ */
+ close(code?: number, reason?: string): void;
+ /**
+ * Transmits data using the WebSocket connection. data can be a string, a Blob, an ArrayBuffer, or an ArrayBufferView.
+ */
+ send(data: string | ArrayBufferLike | Blob | ArrayBufferView): void;
+ readonly CLOSED: number;
+ readonly CLOSING: number;
+ readonly CONNECTING: number;
+ readonly OPEN: number;
+ addEventListener<K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var WebSocket: {
+ prototype: WebSocket;
+ new(url: string, protocols?: string | string[]): WebSocket;
+ readonly CLOSED: number;
+ readonly CLOSING: number;
+ readonly CONNECTING: number;
+ readonly OPEN: number;
+};
+
+/** Events that occur due to the user moving a mouse wheel or similar input device. */
+interface WheelEvent extends MouseEvent {
+ readonly deltaMode: number;
+ readonly deltaX: number;
+ readonly deltaY: number;
+ readonly deltaZ: number;
+ readonly DOM_DELTA_LINE: number;
+ readonly DOM_DELTA_PAGE: number;
+ readonly DOM_DELTA_PIXEL: number;
+}
+
+declare var WheelEvent: {
+ prototype: WheelEvent;
+ new(type: string, eventInitDict?: WheelEventInit): WheelEvent;
+ readonly DOM_DELTA_LINE: number;
+ readonly DOM_DELTA_PAGE: number;
+ readonly DOM_DELTA_PIXEL: number;
+};
+
+interface WindowEventMap extends GlobalEventHandlersEventMap, WindowEventHandlersEventMap {
+ "abort": UIEvent;
+ "afterprint": Event;
+ "beforeprint": Event;
+ "beforeunload": BeforeUnloadEvent;
+ "blur": FocusEvent;
+ "canplay": Event;
+ "canplaythrough": Event;
+ "change": Event;
+ "click": MouseEvent;
+ "compassneedscalibration": Event;
+ "contextmenu": MouseEvent;
+ "dblclick": MouseEvent;
+ "devicelight": DeviceLightEvent;
+ "devicemotion": DeviceMotionEvent;
+ "deviceorientation": DeviceOrientationEvent;
+ "deviceorientationabsolute": DeviceOrientationEvent;
+ "drag": DragEvent;
+ "dragend": DragEvent;
+ "dragenter": DragEvent;
+ "dragleave": DragEvent;
+ "dragover": DragEvent;
+ "dragstart": DragEvent;
+ "drop": DragEvent;
+ "durationchange": Event;
+ "emptied": Event;
+ "ended": Event;
+ "error": ErrorEvent;
+ "focus": FocusEvent;
+ "hashchange": HashChangeEvent;
+ "input": Event;
+ "invalid": Event;
+ "keydown": KeyboardEvent;
+ "keypress": KeyboardEvent;
+ "keyup": KeyboardEvent;
+ "load": Event;
+ "loadeddata": Event;
+ "loadedmetadata": Event;
+ "loadstart": Event;
+ "message": MessageEvent;
+ "mousedown": MouseEvent;
+ "mouseenter": MouseEvent;
+ "mouseleave": MouseEvent;
+ "mousemove": MouseEvent;
+ "mouseout": MouseEvent;
+ "mouseover": MouseEvent;
+ "mouseup": MouseEvent;
+ "mousewheel": Event;
+ "MSGestureChange": Event;
+ "MSGestureDoubleTap": Event;
+ "MSGestureEnd": Event;
+ "MSGestureHold": Event;
+ "MSGestureStart": Event;
+ "MSGestureTap": Event;
+ "MSInertiaStart": Event;
+ "MSPointerCancel": Event;
+ "MSPointerDown": Event;
+ "MSPointerEnter": Event;
+ "MSPointerLeave": Event;
+ "MSPointerMove": Event;
+ "MSPointerOut": Event;
+ "MSPointerOver": Event;
+ "MSPointerUp": Event;
+ "offline": Event;
+ "online": Event;
+ "orientationchange": Event;
+ "pagehide": PageTransitionEvent;
+ "pageshow": PageTransitionEvent;
+ "pause": Event;
+ "play": Event;
+ "playing": Event;
+ "popstate": PopStateEvent;
+ "progress": ProgressEvent<Window>;
+ "ratechange": Event;
+ "readystatechange": ProgressEvent<Window>;
+ "reset": Event;
+ "resize": UIEvent;
+ "scroll": Event;
+ "seeked": Event;
+ "seeking": Event;
+ "select": Event;
+ "stalled": Event;
+ "storage": StorageEvent;
+ "submit": Event;
+ "suspend": Event;
+ "timeupdate": Event;
+ "unload": Event;
+ "volumechange": Event;
+ "vrdisplayactivate": Event;
+ "vrdisplayblur": Event;
+ "vrdisplayconnect": Event;
+ "vrdisplaydeactivate": Event;
+ "vrdisplaydisconnect": Event;
+ "vrdisplayfocus": Event;
+ "vrdisplaypointerrestricted": Event;
+ "vrdisplaypointerunrestricted": Event;
+ "vrdisplaypresentchange": Event;
+ "waiting": Event;
+}
+
+/** A window containing a DOM document; the document property points to the DOM document loaded in that window. */
+interface Window extends EventTarget, AnimationFrameProvider, GlobalEventHandlers, WindowEventHandlers, WindowLocalStorage, WindowOrWorkerGlobalScope, WindowSessionStorage {
+ readonly applicationCache: ApplicationCache;
+ readonly clientInformation: Navigator;
+ readonly closed: boolean;
+ customElements: CustomElementRegistry;
+ defaultStatus: string;
+ readonly devicePixelRatio: number;
+ readonly doNotTrack: string;
+ readonly document: Document;
+ /** @deprecated */
+ readonly event: Event | undefined;
+ /** @deprecated */
+ readonly external: External;
+ readonly frameElement: Element;
+ readonly frames: Window;
+ readonly history: History;
+ readonly innerHeight: number;
+ readonly innerWidth: number;
+ readonly length: number;
+ location: Location;
+ readonly locationbar: BarProp;
+ readonly menubar: BarProp;
+ readonly msContentScript: ExtensionScriptApis;
+ name: string;
+ readonly navigator: Navigator;
+ offscreenBuffering: string | boolean;
+ oncompassneedscalibration: ((this: Window, ev: Event) => any) | null;
+ ondevicelight: ((this: Window, ev: DeviceLightEvent) => any) | null;
+ ondevicemotion: ((this: Window, ev: DeviceMotionEvent) => any) | null;
+ ondeviceorientation: ((this: Window, ev: DeviceOrientationEvent) => any) | null;
+ ondeviceorientationabsolute: ((this: Window, ev: DeviceOrientationEvent) => any) | null;
+ onmousewheel: ((this: Window, ev: Event) => any) | null;
+ onmsgesturechange: ((this: Window, ev: Event) => any) | null;
+ onmsgesturedoubletap: ((this: Window, ev: Event) => any) | null;
+ onmsgestureend: ((this: Window, ev: Event) => any) | null;
+ onmsgesturehold: ((this: Window, ev: Event) => any) | null;
+ onmsgesturestart: ((this: Window, ev: Event) => any) | null;
+ onmsgesturetap: ((this: Window, ev: Event) => any) | null;
+ onmsinertiastart: ((this: Window, ev: Event) => any) | null;
+ onmspointercancel: ((this: Window, ev: Event) => any) | null;
+ onmspointerdown: ((this: Window, ev: Event) => any) | null;
+ onmspointerenter: ((this: Window, ev: Event) => any) | null;
+ onmspointerleave: ((this: Window, ev: Event) => any) | null;
+ onmspointermove: ((this: Window, ev: Event) => any) | null;
+ onmspointerout: ((this: Window, ev: Event) => any) | null;
+ onmspointerover: ((this: Window, ev: Event) => any) | null;
+ onmspointerup: ((this: Window, ev: Event) => any) | null;
+ /** @deprecated */
+ onorientationchange: ((this: Window, ev: Event) => any) | null;
+ onreadystatechange: ((this: Window, ev: ProgressEvent<Window>) => any) | null;
+ onvrdisplayactivate: ((this: Window, ev: Event) => any) | null;
+ onvrdisplayblur: ((this: Window, ev: Event) => any) | null;
+ onvrdisplayconnect: ((this: Window, ev: Event) => any) | null;
+ onvrdisplaydeactivate: ((this: Window, ev: Event) => any) | null;
+ onvrdisplaydisconnect: ((this: Window, ev: Event) => any) | null;
+ onvrdisplayfocus: ((this: Window, ev: Event) => any) | null;
+ onvrdisplaypointerrestricted: ((this: Window, ev: Event) => any) | null;
+ onvrdisplaypointerunrestricted: ((this: Window, ev: Event) => any) | null;
+ onvrdisplaypresentchange: ((this: Window, ev: Event) => any) | null;
+ opener: any;
+ /** @deprecated */
+ readonly orientation: string | number;
+ readonly outerHeight: number;
+ readonly outerWidth: number;
+ readonly pageXOffset: number;
+ readonly pageYOffset: number;
+ readonly parent: Window;
+ readonly personalbar: BarProp;
+ readonly screen: Screen;
+ readonly screenLeft: number;
+ readonly screenTop: number;
+ readonly screenX: number;
+ readonly screenY: number;
+ readonly scrollX: number;
+ readonly scrollY: number;
+ readonly scrollbars: BarProp;
+ readonly self: Window & typeof globalThis;
+ readonly speechSynthesis: SpeechSynthesis;
+ status: string;
+ readonly statusbar: BarProp;
+ readonly styleMedia: StyleMedia;
+ readonly toolbar: BarProp;
+ readonly top: Window;
+ readonly window: Window & typeof globalThis;
+ alert(message?: any): void;
+ blur(): void;
+ /** @deprecated */
+ captureEvents(): void;
+ close(): void;
+ confirm(message?: string): boolean;
+ departFocus(navigationReason: NavigationReason, origin: FocusNavigationOrigin): void;
+ focus(): void;
+ getComputedStyle(elt: Element, pseudoElt?: string | null): CSSStyleDeclaration;
+ getMatchedCSSRules(elt: Element, pseudoElt?: string | null): CSSRuleList;
+ getSelection(): Selection | null;
+ matchMedia(query: string): MediaQueryList;
+ moveBy(x: number, y: number): void;
+ moveTo(x: number, y: number): void;
+ msWriteProfilerMark(profilerMarkName: string): void;
+ open(url?: string, target?: string, features?: string, replace?: boolean): Window | null;
+ postMessage(message: any, targetOrigin: string, transfer?: Transferable[]): void;
+ print(): void;
+ prompt(message?: string, _default?: string): string | null;
+ /** @deprecated */
+ releaseEvents(): void;
+ resizeBy(x: number, y: number): void;
+ resizeTo(x: number, y: number): void;
+ scroll(options?: ScrollToOptions): void;
+ scroll(x: number, y: number): void;
+ scrollBy(options?: ScrollToOptions): void;
+ scrollBy(x: number, y: number): void;
+ scrollTo(options?: ScrollToOptions): void;
+ scrollTo(x: number, y: number): void;
+ stop(): void;
+ webkitCancelAnimationFrame(handle: number): void;
+ webkitConvertPointFromNodeToPage(node: Node, pt: WebKitPoint): WebKitPoint;
+ webkitConvertPointFromPageToNode(node: Node, pt: WebKitPoint): WebKitPoint;
+ webkitRequestAnimationFrame(callback: FrameRequestCallback): number;
+ addEventListener<K extends keyof WindowEventMap>(type: K, listener: (this: Window, ev: WindowEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof WindowEventMap>(type: K, listener: (this: Window, ev: WindowEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+ [index: number]: Window;
+}
+
+declare var Window: {
+ prototype: Window;
+ new(): Window;
+};
+
+interface WindowEventHandlersEventMap {
+ "afterprint": Event;
+ "beforeprint": Event;
+ "beforeunload": BeforeUnloadEvent;
+ "hashchange": HashChangeEvent;
+ "languagechange": Event;
+ "message": MessageEvent;
+ "messageerror": MessageEvent;
+ "offline": Event;
+ "online": Event;
+ "pagehide": PageTransitionEvent;
+ "pageshow": PageTransitionEvent;
+ "popstate": PopStateEvent;
+ "rejectionhandled": PromiseRejectionEvent;
+ "storage": StorageEvent;
+ "unhandledrejection": PromiseRejectionEvent;
+ "unload": Event;
+}
+
+interface WindowEventHandlers {
+ onafterprint: ((this: WindowEventHandlers, ev: Event) => any) | null;
+ onbeforeprint: ((this: WindowEventHandlers, ev: Event) => any) | null;
+ onbeforeunload: ((this: WindowEventHandlers, ev: BeforeUnloadEvent) => any) | null;
+ onhashchange: ((this: WindowEventHandlers, ev: HashChangeEvent) => any) | null;
+ onlanguagechange: ((this: WindowEventHandlers, ev: Event) => any) | null;
+ onmessage: ((this: WindowEventHandlers, ev: MessageEvent) => any) | null;
+ onmessageerror: ((this: WindowEventHandlers, ev: MessageEvent) => any) | null;
+ onoffline: ((this: WindowEventHandlers, ev: Event) => any) | null;
+ ononline: ((this: WindowEventHandlers, ev: Event) => any) | null;
+ onpagehide: ((this: WindowEventHandlers, ev: PageTransitionEvent) => any) | null;
+ onpageshow: ((this: WindowEventHandlers, ev: PageTransitionEvent) => any) | null;
+ onpopstate: ((this: WindowEventHandlers, ev: PopStateEvent) => any) | null;
+ onrejectionhandled: ((this: WindowEventHandlers, ev: PromiseRejectionEvent) => any) | null;
+ onstorage: ((this: WindowEventHandlers, ev: StorageEvent) => any) | null;
+ onunhandledrejection: ((this: WindowEventHandlers, ev: PromiseRejectionEvent) => any) | null;
+ onunload: ((this: WindowEventHandlers, ev: Event) => any) | null;
+ addEventListener<K extends keyof WindowEventHandlersEventMap>(type: K, listener: (this: WindowEventHandlers, ev: WindowEventHandlersEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof WindowEventHandlersEventMap>(type: K, listener: (this: WindowEventHandlers, ev: WindowEventHandlersEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+interface WindowLocalStorage {
+ readonly localStorage: Storage;
+}
+
+interface WindowOrWorkerGlobalScope {
+ readonly caches: CacheStorage;
+ readonly crypto: Crypto;
+ readonly indexedDB: IDBFactory;
+ readonly isSecureContext: boolean;
+ readonly origin: string;
+ readonly performance: Performance;
+ atob(data: string): string;
+ btoa(data: string): string;
+ clearInterval(handle?: number): void;
+ clearTimeout(handle?: number): void;
+ createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
+ createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
+ fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
+ queueMicrotask(callback: VoidFunction): void;
+ setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
+ setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
+}
+
+interface WindowSessionStorage {
+ readonly sessionStorage: Storage;
+}
+
+interface WorkerEventMap extends AbstractWorkerEventMap {
+ "message": MessageEvent;
+ "messageerror": MessageEvent;
+}
+
+/** This Web Workers API interface represents a background task that can be easily created and can send messages back to its creator. Creating a worker is as simple as calling the Worker() constructor and specifying a script to be run in the worker thread. */
+interface Worker extends EventTarget, AbstractWorker {
+ onmessage: ((this: Worker, ev: MessageEvent) => any) | null;
+ onmessageerror: ((this: Worker, ev: MessageEvent) => any) | null;
+ /**
+ * Clones message and transmits it to worker's global environment. transfer can be passed as a list of objects that are to be transferred rather than cloned.
+ */
+ postMessage(message: any, transfer: Transferable[]): void;
+ postMessage(message: any, options?: PostMessageOptions): void;
+ /**
+ * Aborts worker's associated global environment.
+ */
+ terminate(): void;
+ addEventListener<K extends keyof WorkerEventMap>(type: K, listener: (this: Worker, ev: WorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof WorkerEventMap>(type: K, listener: (this: Worker, ev: WorkerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var Worker: {
+ prototype: Worker;
+ new(stringUrl: string | URL, options?: WorkerOptions): Worker;
+};
+
+interface Worklet {
+ addModule(moduleURL: string, options?: WorkletOptions): Promise<void>;
+}
+
+declare var Worklet: {
+ prototype: Worklet;
+ new(): Worklet;
+};
+
+/** This Streams API interface provides a standard abstraction for writing streaming data to a destination, known as a sink. This object comes with built-in backpressure and queuing. */
+interface WritableStream<W = any> {
+ readonly locked: boolean;
+ abort(reason?: any): Promise<void>;
+ getWriter(): WritableStreamDefaultWriter<W>;
+}
+
+declare var WritableStream: {
+ prototype: WritableStream;
+ new<W = any>(underlyingSink?: UnderlyingSink<W>, strategy?: QueuingStrategy<W>): WritableStream<W>;
+};
+
+/** This Streams API interface 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. */
+interface WritableStreamDefaultController {
+ error(error?: any): void;
+}
+
+/** This Streams API interface 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. */
+interface WritableStreamDefaultWriter<W = any> {
+ readonly closed: Promise<void>;
+ readonly desiredSize: number | null;
+ readonly ready: Promise<void>;
+ abort(reason?: any): Promise<void>;
+ close(): Promise<void>;
+ releaseLock(): void;
+ write(chunk: W): Promise<void>;
+}
+
+/** An XML document. It inherits from the generic Document and does not add any specific methods or properties to it: nevertheless, several algorithms behave differently with the two types of documents. */
+interface XMLDocument extends Document {
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: XMLDocument, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: XMLDocument, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var XMLDocument: {
+ prototype: XMLDocument;
+ new(): XMLDocument;
+};
+
+interface XMLHttpRequestEventMap extends XMLHttpRequestEventTargetEventMap {
+ "readystatechange": Event;
+}
+
+/** Use XMLHttpRequest (XHR) objects to interact with servers. You can retrieve data from a URL without having to do a full page refresh. This enables a Web page to update just part of a page without disrupting what the user is doing. */
+interface XMLHttpRequest extends XMLHttpRequestEventTarget {
+ onreadystatechange: ((this: XMLHttpRequest, ev: Event) => any) | null;
+ /**
+ * Returns client's state.
+ */
+ readonly readyState: number;
+ /**
+ * Returns the response's body.
+ */
+ readonly response: any;
+ /**
+ * Returns the text response.
+ *
+ * Throws an "InvalidStateError" DOMException if responseType is not the empty string or "text".
+ */
+ readonly responseText: string;
+ /**
+ * Returns the response type.
+ *
+ * Can be set to change the response type. Values are: the empty string (default), "arraybuffer", "blob", "document", "json", and "text".
+ *
+ * When set: setting to "document" is ignored if current global object is not a Window object.
+ *
+ * When set: throws an "InvalidStateError" DOMException if state is loading or done.
+ *
+ * When set: throws an "InvalidAccessError" DOMException if the synchronous flag is set and current global object is a Window object.
+ */
+ responseType: XMLHttpRequestResponseType;
+ readonly responseURL: string;
+ /**
+ * Returns the document response.
+ *
+ * Throws an "InvalidStateError" DOMException if responseType is not the empty string or "document".
+ */
+ readonly responseXML: Document | null;
+ readonly status: number;
+ readonly statusText: string;
+ /**
+ * Can be set to a time in milliseconds. When set to a non-zero value will cause fetching to terminate after the given time has passed. When the time has passed, the request has not yet completed, and the synchronous flag is unset, a timeout event will then be dispatched, or a "TimeoutError" DOMException will be thrown otherwise (for the send() method).
+ *
+ * When set: throws an "InvalidAccessError" DOMException if the synchronous flag is set and current global object is a Window object.
+ */
+ timeout: number;
+ /**
+ * Returns the associated XMLHttpRequestUpload object. It can be used to gather transmission information when data is transferred to a server.
+ */
+ readonly upload: XMLHttpRequestUpload;
+ /**
+ * True when credentials are to be included in a cross-origin request. False when they are to be excluded in a cross-origin request and when cookies are to be ignored in its response. Initially false.
+ *
+ * When set: throws an "InvalidStateError" DOMException if state is not unsent or opened, or if the send() flag is set.
+ */
+ withCredentials: boolean;
+ /**
+ * Cancels any network activity.
+ */
+ abort(): void;
+ getAllResponseHeaders(): string;
+ getResponseHeader(name: string): string | null;
+ /**
+ * Sets the request method, request URL, and synchronous flag.
+ *
+ * Throws a "SyntaxError" DOMException if either method is not a valid HTTP method or url cannot be parsed.
+ *
+ * Throws a "SecurityError" DOMException if method is a case-insensitive match for `CONNECT`, `TRACE`, or `TRACK`.
+ *
+ * Throws an "InvalidAccessError" DOMException if async is false, current global object is a Window object, and the timeout attribute is not zero or the responseType attribute is not the empty string.
+ */
+ open(method: string, url: string): void;
+ open(method: string, url: string, async: boolean, username?: string | null, password?: string | null): void;
+ /**
+ * Acts as if the `Content-Type` header value for response is mime. (It does not actually change the header though.)
+ *
+ * Throws an "InvalidStateError" DOMException if state is loading or done.
+ */
+ overrideMimeType(mime: string): void;
+ /**
+ * Initiates the request. The body argument provides the request body, if any, and is ignored if the request method is GET or HEAD.
+ *
+ * Throws an "InvalidStateError" DOMException if either state is not opened or the send() flag is set.
+ */
+ send(body?: Document | BodyInit | null): void;
+ /**
+ * Combines a header in author request headers.
+ *
+ * Throws an "InvalidStateError" DOMException if either state is not opened or the send() flag is set.
+ *
+ * Throws a "SyntaxError" DOMException if name is not a header name or if value is not a header value.
+ */
+ setRequestHeader(name: string, value: string): void;
+ readonly DONE: number;
+ readonly HEADERS_RECEIVED: number;
+ readonly LOADING: number;
+ readonly OPENED: number;
+ readonly UNSENT: number;
+ addEventListener<K extends keyof XMLHttpRequestEventMap>(type: K, listener: (this: XMLHttpRequest, ev: XMLHttpRequestEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof XMLHttpRequestEventMap>(type: K, listener: (this: XMLHttpRequest, ev: XMLHttpRequestEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var XMLHttpRequest: {
+ prototype: XMLHttpRequest;
+ new(): XMLHttpRequest;
+ readonly DONE: number;
+ readonly HEADERS_RECEIVED: number;
+ readonly LOADING: number;
+ readonly OPENED: number;
+ readonly UNSENT: number;
+};
+
+interface XMLHttpRequestEventTargetEventMap {
+ "abort": ProgressEvent<XMLHttpRequestEventTarget>;
+ "error": ProgressEvent<XMLHttpRequestEventTarget>;
+ "load": ProgressEvent<XMLHttpRequestEventTarget>;
+ "loadend": ProgressEvent<XMLHttpRequestEventTarget>;
+ "loadstart": ProgressEvent<XMLHttpRequestEventTarget>;
+ "progress": ProgressEvent<XMLHttpRequestEventTarget>;
+ "timeout": ProgressEvent<XMLHttpRequestEventTarget>;
+}
+
+interface XMLHttpRequestEventTarget extends EventTarget {
+ onabort: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
+ onerror: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
+ onload: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
+ onloadend: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
+ onloadstart: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
+ onprogress: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
+ ontimeout: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
+ addEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestEventTarget, ev: XMLHttpRequestEventTargetEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestEventTarget, ev: XMLHttpRequestEventTargetEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var XMLHttpRequestEventTarget: {
+ prototype: XMLHttpRequestEventTarget;
+ new(): XMLHttpRequestEventTarget;
+};
+
+interface XMLHttpRequestUpload extends XMLHttpRequestEventTarget {
+ addEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestUpload, ev: XMLHttpRequestEventTargetEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestUpload, ev: XMLHttpRequestEventTargetEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var XMLHttpRequestUpload: {
+ prototype: XMLHttpRequestUpload;
+ new(): XMLHttpRequestUpload;
+};
+
+/** Provides the serializeToString() method to construct an XML string representing a DOM tree. */
+interface XMLSerializer {
+ serializeToString(root: Node): string;
+}
+
+declare var XMLSerializer: {
+ prototype: XMLSerializer;
+ new(): XMLSerializer;
+};
+
+/** The XPathEvaluator interface allows to compile and evaluate XPath expressions. */
+interface XPathEvaluator extends XPathEvaluatorBase {
+}
+
+declare var XPathEvaluator: {
+ prototype: XPathEvaluator;
+ new(): XPathEvaluator;
+};
+
+interface XPathEvaluatorBase {
+ createExpression(expression: string, resolver?: XPathNSResolver | null): XPathExpression;
+ createNSResolver(nodeResolver: Node): XPathNSResolver;
+ evaluate(expression: string, contextNode: Node, resolver?: XPathNSResolver | null, type?: number, result?: XPathResult | null): XPathResult;
+}
+
+/** This interface is a compiled XPath expression that can be evaluated on a document or specific node to return information its DOM tree. */
+interface XPathExpression {
+ evaluate(contextNode: Node, type?: number, result?: XPathResult | null): XPathResult;
+}
+
+declare var XPathExpression: {
+ prototype: XPathExpression;
+ new(): XPathExpression;
+};
+
+/** The results generated by evaluating an XPath expression within the context of a given node. */
+interface XPathResult {
+ readonly booleanValue: boolean;
+ readonly invalidIteratorState: boolean;
+ readonly numberValue: number;
+ readonly resultType: number;
+ readonly singleNodeValue: Node | null;
+ readonly snapshotLength: number;
+ readonly stringValue: string;
+ iterateNext(): Node | null;
+ snapshotItem(index: number): Node | null;
+ readonly ANY_TYPE: number;
+ readonly ANY_UNORDERED_NODE_TYPE: number;
+ readonly BOOLEAN_TYPE: number;
+ readonly FIRST_ORDERED_NODE_TYPE: number;
+ readonly NUMBER_TYPE: number;
+ readonly ORDERED_NODE_ITERATOR_TYPE: number;
+ readonly ORDERED_NODE_SNAPSHOT_TYPE: number;
+ readonly STRING_TYPE: number;
+ readonly UNORDERED_NODE_ITERATOR_TYPE: number;
+ readonly UNORDERED_NODE_SNAPSHOT_TYPE: number;
+}
+
+declare var XPathResult: {
+ prototype: XPathResult;
+ new(): XPathResult;
+ readonly ANY_TYPE: number;
+ readonly ANY_UNORDERED_NODE_TYPE: number;
+ readonly BOOLEAN_TYPE: number;
+ readonly FIRST_ORDERED_NODE_TYPE: number;
+ readonly NUMBER_TYPE: number;
+ readonly ORDERED_NODE_ITERATOR_TYPE: number;
+ readonly ORDERED_NODE_SNAPSHOT_TYPE: number;
+ readonly STRING_TYPE: number;
+ readonly UNORDERED_NODE_ITERATOR_TYPE: number;
+ readonly UNORDERED_NODE_SNAPSHOT_TYPE: number;
+};
+
+/** An XSLTProcessor applies an XSLT stylesheet transformation to an XML document to produce a new XML document as output. It has methods to load the XSLT stylesheet, to manipulate <xsl:param> parameter values, and to apply the transformation to documents. */
+interface XSLTProcessor {
+ clearParameters(): void;
+ getParameter(namespaceURI: string, localName: string): any;
+ importStylesheet(style: Node): void;
+ removeParameter(namespaceURI: string, localName: string): void;
+ reset(): void;
+ setParameter(namespaceURI: string, localName: string, value: any): void;
+ transformToDocument(source: Node): Document;
+ transformToFragment(source: Node, document: Document): DocumentFragment;
+}
+
+declare var XSLTProcessor: {
+ prototype: XSLTProcessor;
+ new(): XSLTProcessor;
+};
+
+interface webkitRTCPeerConnection extends RTCPeerConnection {
+ addEventListener<K extends keyof RTCPeerConnectionEventMap>(type: K, listener: (this: webkitRTCPeerConnection, ev: RTCPeerConnectionEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof RTCPeerConnectionEventMap>(type: K, listener: (this: webkitRTCPeerConnection, ev: RTCPeerConnectionEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var webkitRTCPeerConnection: {
+ prototype: webkitRTCPeerConnection;
+ new(configuration: RTCConfiguration): webkitRTCPeerConnection;
+};
+
+declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
+
+interface Console {
+ memory: any;
+ assert(condition?: boolean, ...data: any[]): void;
+ clear(): void;
+ count(label?: string): void;
+ countReset(label?: string): void;
+ debug(...data: any[]): void;
+ dir(item?: any, options?: any): void;
+ dirxml(...data: any[]): void;
+ error(...data: any[]): void;
+ exception(message?: string, ...optionalParams: any[]): void;
+ group(...data: any[]): void;
+ groupCollapsed(...data: any[]): void;
+ groupEnd(): void;
+ info(...data: any[]): void;
+ log(...data: any[]): void;
+ table(tabularData?: any, properties?: string[]): void;
+ time(label?: string): void;
+ timeEnd(label?: string): void;
+ timeLog(label?: string, ...data: any[]): void;
+ timeStamp(label?: string): void;
+ trace(...data: any[]): void;
+ warn(...data: any[]): void;
+}
+
+declare var console: Console;
+
+/** Holds useful CSS-related methods. No object with this interface are implemented: it contains only static methods and therefore is a utilitarian interface. */
+declare namespace CSS {
+ function escape(ident: string): string;
+ function supports(property: string, value: string): boolean;
+ function supports(conditionText: string): boolean;
+}
+
+declare namespace WebAssembly {
+ interface CompileError {
+ }
+
+ var CompileError: {
+ prototype: CompileError;
+ new(): CompileError;
+ };
+
+ interface Global {
+ value: any;
+ valueOf(): any;
+ }
+
+ var Global: {
+ prototype: Global;
+ new(descriptor: GlobalDescriptor, v?: any): Global;
+ };
+
+ interface Instance {
+ readonly exports: Exports;
+ }
+
+ var Instance: {
+ prototype: Instance;
+ new(module: Module, importObject?: Imports): Instance;
+ };
+
+ interface LinkError {
+ }
+
+ var LinkError: {
+ prototype: LinkError;
+ new(): LinkError;
+ };
+
+ interface Memory {
+ readonly buffer: ArrayBuffer;
+ grow(delta: number): number;
+ }
+
+ var Memory: {
+ prototype: Memory;
+ new(descriptor: MemoryDescriptor): Memory;
+ };
+
+ interface Module {
+ }
+
+ var Module: {
+ prototype: Module;
+ new(bytes: BufferSource): Module;
+ customSections(moduleObject: Module, sectionName: string): ArrayBuffer[];
+ exports(moduleObject: Module): ModuleExportDescriptor[];
+ imports(moduleObject: Module): ModuleImportDescriptor[];
+ };
+
+ interface RuntimeError {
+ }
+
+ var RuntimeError: {
+ prototype: RuntimeError;
+ new(): RuntimeError;
+ };
+
+ interface Table {
+ readonly length: number;
+ get(index: number): Function | null;
+ grow(delta: number): number;
+ set(index: number, value: Function | null): void;
+ }
+
+ var Table: {
+ prototype: Table;
+ new(descriptor: TableDescriptor): Table;
+ };
+
+ interface GlobalDescriptor {
+ mutable?: boolean;
+ value: ValueType;
+ }
+
+ interface MemoryDescriptor {
+ initial: number;
+ maximum?: number;
+ }
+
+ interface ModuleExportDescriptor {
+ kind: ImportExportKind;
+ name: string;
+ }
+
+ interface ModuleImportDescriptor {
+ kind: ImportExportKind;
+ module: string;
+ name: string;
+ }
+
+ interface TableDescriptor {
+ element: TableKind;
+ initial: number;
+ maximum?: number;
+ }
+
+ interface WebAssemblyInstantiatedSource {
+ instance: Instance;
+ module: Module;
+ }
+
+ type ImportExportKind = "function" | "global" | "memory" | "table";
+ type TableKind = "anyfunc";
+ type ValueType = "f32" | "f64" | "i32" | "i64";
+ type ExportValue = Function | Global | Memory | Table;
+ type Exports = Record<string, ExportValue>;
+ type ImportValue = ExportValue | number;
+ type ModuleImports = Record<string, ImportValue>;
+ type Imports = Record<string, ModuleImports>;
+ function compile(bytes: BufferSource): Promise<Module>;
+ function compileStreaming(source: Response | Promise<Response>): Promise<Module>;
+ function instantiate(bytes: BufferSource, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
+ function instantiate(moduleObject: Module, importObject?: Imports): Promise<Instance>;
+ function instantiateStreaming(response: Response | PromiseLike<Response>, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
+ function validate(bytes: BufferSource): boolean;
+}
+
+interface BlobCallback {
+ (blob: Blob | null): void;
+}
+
+interface CustomElementConstructor {
+ new (...params: any[]): HTMLElement;
+}
+
+interface DecodeErrorCallback {
+ (error: DOMException): void;
+}
+
+interface DecodeSuccessCallback {
+ (decodedData: AudioBuffer): void;
+}
+
+interface EventHandlerNonNull {
+ (event: Event): any;
+}
+
+interface ForEachCallback {
+ (keyId: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer | null, status: MediaKeyStatus): void;
+}
+
+interface FrameRequestCallback {
+ (time: number): void;
+}
+
+interface FunctionStringCallback {
+ (data: string): void;
+}
+
+interface IntersectionObserverCallback {
+ (entries: IntersectionObserverEntry[], observer: IntersectionObserver): void;
+}
+
+interface MSLaunchUriCallback {
+ (): void;
+}
+
+interface MutationCallback {
+ (mutations: MutationRecord[], observer: MutationObserver): void;
+}
+
+interface NavigatorUserMediaErrorCallback {
+ (error: MediaStreamError): void;
+}
+
+interface NavigatorUserMediaSuccessCallback {
+ (stream: MediaStream): void;
+}
+
+interface NotificationPermissionCallback {
+ (permission: NotificationPermission): void;
+}
+
+interface OnBeforeUnloadEventHandlerNonNull {
+ (event: Event): string | null;
+}
+
+interface OnErrorEventHandlerNonNull {
+ (event: Event | string, source?: string, lineno?: number, colno?: number, error?: Error): any;
+}
+
+interface PerformanceObserverCallback {
+ (entries: PerformanceObserverEntryList, observer: PerformanceObserver): void;
+}
+
+interface PositionCallback {
+ (position: Position): void;
+}
+
+interface PositionErrorCallback {
+ (positionError: PositionError): void;
+}
+
+interface QueuingStrategySizeCallback<T = any> {
+ (chunk: T): number;
+}
+
+interface RTCPeerConnectionErrorCallback {
+ (error: DOMException): void;
+}
+
+interface RTCSessionDescriptionCallback {
+ (description: RTCSessionDescriptionInit): void;
+}
+
+interface RTCStatsCallback {
+ (report: RTCStatsReport): void;
+}
+
+interface ReadableByteStreamControllerCallback {
+ (controller: ReadableByteStreamController): void | PromiseLike<void>;
+}
+
+interface ReadableStreamDefaultControllerCallback<R> {
+ (controller: ReadableStreamDefaultController<R>): void | PromiseLike<void>;
+}
+
+interface ReadableStreamErrorCallback {
+ (reason: any): void | PromiseLike<void>;
+}
+
+interface TransformStreamDefaultControllerCallback<O> {
+ (controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
+}
+
+interface TransformStreamDefaultControllerTransformCallback<I, O> {
+ (chunk: I, controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
+}
+
+interface VoidFunction {
+ (): void;
+}
+
+interface WritableStreamDefaultControllerCloseCallback {
+ (): void | PromiseLike<void>;
+}
+
+interface WritableStreamDefaultControllerStartCallback {
+ (controller: WritableStreamDefaultController): void | PromiseLike<void>;
+}
+
+interface WritableStreamDefaultControllerWriteCallback<W> {
+ (chunk: W, controller: WritableStreamDefaultController): void | PromiseLike<void>;
+}
+
+interface WritableStreamErrorCallback {
+ (reason: any): void | PromiseLike<void>;
+}
+
+interface HTMLElementTagNameMap {
+ "a": HTMLAnchorElement;
+ "abbr": HTMLElement;
+ "address": HTMLElement;
+ "applet": HTMLAppletElement;
+ "area": HTMLAreaElement;
+ "article": HTMLElement;
+ "aside": HTMLElement;
+ "audio": HTMLAudioElement;
+ "b": HTMLElement;
+ "base": HTMLBaseElement;
+ "basefont": HTMLBaseFontElement;
+ "bdi": HTMLElement;
+ "bdo": HTMLElement;
+ "blockquote": HTMLQuoteElement;
+ "body": HTMLBodyElement;
+ "br": HTMLBRElement;
+ "button": HTMLButtonElement;
+ "canvas": HTMLCanvasElement;
+ "caption": HTMLTableCaptionElement;
+ "cite": HTMLElement;
+ "code": HTMLElement;
+ "col": HTMLTableColElement;
+ "colgroup": HTMLTableColElement;
+ "data": HTMLDataElement;
+ "datalist": HTMLDataListElement;
+ "dd": HTMLElement;
+ "del": HTMLModElement;
+ "details": HTMLDetailsElement;
+ "dfn": HTMLElement;
+ "dialog": HTMLDialogElement;
+ "dir": HTMLDirectoryElement;
+ "div": HTMLDivElement;
+ "dl": HTMLDListElement;
+ "dt": HTMLElement;
+ "em": HTMLElement;
+ "embed": HTMLEmbedElement;
+ "fieldset": HTMLFieldSetElement;
+ "figcaption": HTMLElement;
+ "figure": HTMLElement;
+ "font": HTMLFontElement;
+ "footer": HTMLElement;
+ "form": HTMLFormElement;
+ "frame": HTMLFrameElement;
+ "frameset": HTMLFrameSetElement;
+ "h1": HTMLHeadingElement;
+ "h2": HTMLHeadingElement;
+ "h3": HTMLHeadingElement;
+ "h4": HTMLHeadingElement;
+ "h5": HTMLHeadingElement;
+ "h6": HTMLHeadingElement;
+ "head": HTMLHeadElement;
+ "header": HTMLElement;
+ "hgroup": HTMLElement;
+ "hr": HTMLHRElement;
+ "html": HTMLHtmlElement;
+ "i": HTMLElement;
+ "iframe": HTMLIFrameElement;
+ "img": HTMLImageElement;
+ "input": HTMLInputElement;
+ "ins": HTMLModElement;
+ "kbd": HTMLElement;
+ "label": HTMLLabelElement;
+ "legend": HTMLLegendElement;
+ "li": HTMLLIElement;
+ "link": HTMLLinkElement;
+ "main": HTMLElement;
+ "map": HTMLMapElement;
+ "mark": HTMLElement;
+ "marquee": HTMLMarqueeElement;
+ "menu": HTMLMenuElement;
+ "meta": HTMLMetaElement;
+ "meter": HTMLMeterElement;
+ "nav": HTMLElement;
+ "noscript": HTMLElement;
+ "object": HTMLObjectElement;
+ "ol": HTMLOListElement;
+ "optgroup": HTMLOptGroupElement;
+ "option": HTMLOptionElement;
+ "output": HTMLOutputElement;
+ "p": HTMLParagraphElement;
+ "param": HTMLParamElement;
+ "picture": HTMLPictureElement;
+ "pre": HTMLPreElement;
+ "progress": HTMLProgressElement;
+ "q": HTMLQuoteElement;
+ "rp": HTMLElement;
+ "rt": HTMLElement;
+ "ruby": HTMLElement;
+ "s": HTMLElement;
+ "samp": HTMLElement;
+ "script": HTMLScriptElement;
+ "section": HTMLElement;
+ "select": HTMLSelectElement;
+ "slot": HTMLSlotElement;
+ "small": HTMLElement;
+ "source": HTMLSourceElement;
+ "span": HTMLSpanElement;
+ "strong": HTMLElement;
+ "style": HTMLStyleElement;
+ "sub": HTMLElement;
+ "summary": HTMLElement;
+ "sup": HTMLElement;
+ "table": HTMLTableElement;
+ "tbody": HTMLTableSectionElement;
+ "td": HTMLTableDataCellElement;
+ "template": HTMLTemplateElement;
+ "textarea": HTMLTextAreaElement;
+ "tfoot": HTMLTableSectionElement;
+ "th": HTMLTableHeaderCellElement;
+ "thead": HTMLTableSectionElement;
+ "time": HTMLTimeElement;
+ "title": HTMLTitleElement;
+ "tr": HTMLTableRowElement;
+ "track": HTMLTrackElement;
+ "u": HTMLElement;
+ "ul": HTMLUListElement;
+ "var": HTMLElement;
+ "video": HTMLVideoElement;
+ "wbr": HTMLElement;
+}
+
+interface HTMLElementDeprecatedTagNameMap {
+ "listing": HTMLPreElement;
+ "xmp": HTMLPreElement;
+}
+
+interface SVGElementTagNameMap {
+ "a": SVGAElement;
+ "circle": SVGCircleElement;
+ "clipPath": SVGClipPathElement;
+ "defs": SVGDefsElement;
+ "desc": SVGDescElement;
+ "ellipse": SVGEllipseElement;
+ "feBlend": SVGFEBlendElement;
+ "feColorMatrix": SVGFEColorMatrixElement;
+ "feComponentTransfer": SVGFEComponentTransferElement;
+ "feComposite": SVGFECompositeElement;
+ "feConvolveMatrix": SVGFEConvolveMatrixElement;
+ "feDiffuseLighting": SVGFEDiffuseLightingElement;
+ "feDisplacementMap": SVGFEDisplacementMapElement;
+ "feDistantLight": SVGFEDistantLightElement;
+ "feFlood": SVGFEFloodElement;
+ "feFuncA": SVGFEFuncAElement;
+ "feFuncB": SVGFEFuncBElement;
+ "feFuncG": SVGFEFuncGElement;
+ "feFuncR": SVGFEFuncRElement;
+ "feGaussianBlur": SVGFEGaussianBlurElement;
+ "feImage": SVGFEImageElement;
+ "feMerge": SVGFEMergeElement;
+ "feMergeNode": SVGFEMergeNodeElement;
+ "feMorphology": SVGFEMorphologyElement;
+ "feOffset": SVGFEOffsetElement;
+ "fePointLight": SVGFEPointLightElement;
+ "feSpecularLighting": SVGFESpecularLightingElement;
+ "feSpotLight": SVGFESpotLightElement;
+ "feTile": SVGFETileElement;
+ "feTurbulence": SVGFETurbulenceElement;
+ "filter": SVGFilterElement;
+ "foreignObject": SVGForeignObjectElement;
+ "g": SVGGElement;
+ "image": SVGImageElement;
+ "line": SVGLineElement;
+ "linearGradient": SVGLinearGradientElement;
+ "marker": SVGMarkerElement;
+ "mask": SVGMaskElement;
+ "metadata": SVGMetadataElement;
+ "path": SVGPathElement;
+ "pattern": SVGPatternElement;
+ "polygon": SVGPolygonElement;
+ "polyline": SVGPolylineElement;
+ "radialGradient": SVGRadialGradientElement;
+ "rect": SVGRectElement;
+ "script": SVGScriptElement;
+ "stop": SVGStopElement;
+ "style": SVGStyleElement;
+ "svg": SVGSVGElement;
+ "switch": SVGSwitchElement;
+ "symbol": SVGSymbolElement;
+ "text": SVGTextElement;
+ "textPath": SVGTextPathElement;
+ "title": SVGTitleElement;
+ "tspan": SVGTSpanElement;
+ "use": SVGUseElement;
+ "view": SVGViewElement;
+}
+
+/** @deprecated Directly use HTMLElementTagNameMap or SVGElementTagNameMap as appropriate, instead. */
+type ElementTagNameMap = HTMLElementTagNameMap & Pick<SVGElementTagNameMap, Exclude<keyof SVGElementTagNameMap, keyof HTMLElementTagNameMap>>;
+
+declare var Audio: {
+ new(src?: string): HTMLAudioElement;
+};
+declare var Image: {
+ new(width?: number, height?: number): HTMLImageElement;
+};
+declare var Option: {
+ new(text?: string, value?: string, defaultSelected?: boolean, selected?: boolean): HTMLOptionElement;
+};
+declare var applicationCache: ApplicationCache;
+declare var clientInformation: Navigator;
+declare var closed: boolean;
+declare var customElements: CustomElementRegistry;
+declare var defaultStatus: string;
+declare var devicePixelRatio: number;
+declare var doNotTrack: string;
+declare var document: Document;
+/** @deprecated */
+declare var event: Event | undefined;
+/** @deprecated */
+declare var external: External;
+declare var frameElement: Element;
+declare var frames: Window;
+declare var history: History;
+declare var innerHeight: number;
+declare var innerWidth: number;
+declare var length: number;
+declare var location: Location;
+declare var locationbar: BarProp;
+declare var menubar: BarProp;
+declare var msContentScript: ExtensionScriptApis;
+declare const name: never;
+declare var navigator: Navigator;
+declare var offscreenBuffering: string | boolean;
+declare var oncompassneedscalibration: ((this: Window, ev: Event) => any) | null;
+declare var ondevicelight: ((this: Window, ev: DeviceLightEvent) => any) | null;
+declare var ondevicemotion: ((this: Window, ev: DeviceMotionEvent) => any) | null;
+declare var ondeviceorientation: ((this: Window, ev: DeviceOrientationEvent) => any) | null;
+declare var ondeviceorientationabsolute: ((this: Window, ev: DeviceOrientationEvent) => any) | null;
+declare var onmousewheel: ((this: Window, ev: Event) => any) | null;
+declare var onmsgesturechange: ((this: Window, ev: Event) => any) | null;
+declare var onmsgesturedoubletap: ((this: Window, ev: Event) => any) | null;
+declare var onmsgestureend: ((this: Window, ev: Event) => any) | null;
+declare var onmsgesturehold: ((this: Window, ev: Event) => any) | null;
+declare var onmsgesturestart: ((this: Window, ev: Event) => any) | null;
+declare var onmsgesturetap: ((this: Window, ev: Event) => any) | null;
+declare var onmsinertiastart: ((this: Window, ev: Event) => any) | null;
+declare var onmspointercancel: ((this: Window, ev: Event) => any) | null;
+declare var onmspointerdown: ((this: Window, ev: Event) => any) | null;
+declare var onmspointerenter: ((this: Window, ev: Event) => any) | null;
+declare var onmspointerleave: ((this: Window, ev: Event) => any) | null;
+declare var onmspointermove: ((this: Window, ev: Event) => any) | null;
+declare var onmspointerout: ((this: Window, ev: Event) => any) | null;
+declare var onmspointerover: ((this: Window, ev: Event) => any) | null;
+declare var onmspointerup: ((this: Window, ev: Event) => any) | null;
+/** @deprecated */
+declare var onorientationchange: ((this: Window, ev: Event) => any) | null;
+declare var onreadystatechange: ((this: Window, ev: ProgressEvent<Window>) => any) | null;
+declare var onvrdisplayactivate: ((this: Window, ev: Event) => any) | null;
+declare var onvrdisplayblur: ((this: Window, ev: Event) => any) | null;
+declare var onvrdisplayconnect: ((this: Window, ev: Event) => any) | null;
+declare var onvrdisplaydeactivate: ((this: Window, ev: Event) => any) | null;
+declare var onvrdisplaydisconnect: ((this: Window, ev: Event) => any) | null;
+declare var onvrdisplayfocus: ((this: Window, ev: Event) => any) | null;
+declare var onvrdisplaypointerrestricted: ((this: Window, ev: Event) => any) | null;
+declare var onvrdisplaypointerunrestricted: ((this: Window, ev: Event) => any) | null;
+declare var onvrdisplaypresentchange: ((this: Window, ev: Event) => any) | null;
+declare var opener: any;
+/** @deprecated */
+declare var orientation: string | number;
+declare var outerHeight: number;
+declare var outerWidth: number;
+declare var pageXOffset: number;
+declare var pageYOffset: number;
+declare var parent: Window;
+declare var personalbar: BarProp;
+declare var screen: Screen;
+declare var screenLeft: number;
+declare var screenTop: number;
+declare var screenX: number;
+declare var screenY: number;
+declare var scrollX: number;
+declare var scrollY: number;
+declare var scrollbars: BarProp;
+declare var self: Window & typeof globalThis;
+declare var speechSynthesis: SpeechSynthesis;
+declare var status: string;
+declare var statusbar: BarProp;
+declare var styleMedia: StyleMedia;
+declare var toolbar: BarProp;
+declare var top: Window;
+declare var window: Window & typeof globalThis;
+declare function alert(message?: any): void;
+declare function blur(): void;
+/** @deprecated */
+declare function captureEvents(): void;
+declare function close(): void;
+declare function confirm(message?: string): boolean;
+declare function departFocus(navigationReason: NavigationReason, origin: FocusNavigationOrigin): void;
+declare function focus(): void;
+declare function getComputedStyle(elt: Element, pseudoElt?: string | null): CSSStyleDeclaration;
+declare function getMatchedCSSRules(elt: Element, pseudoElt?: string | null): CSSRuleList;
+declare function getSelection(): Selection | null;
+declare function matchMedia(query: string): MediaQueryList;
+declare function moveBy(x: number, y: number): void;
+declare function moveTo(x: number, y: number): void;
+declare function msWriteProfilerMark(profilerMarkName: string): void;
+declare function open(url?: string, target?: string, features?: string, replace?: boolean): Window | null;
+declare function postMessage(message: any, targetOrigin: string, transfer?: Transferable[]): void;
+declare function print(): void;
+declare function prompt(message?: string, _default?: string): string | null;
+/** @deprecated */
+declare function releaseEvents(): void;
+declare function resizeBy(x: number, y: number): void;
+declare function resizeTo(x: number, y: number): void;
+declare function scroll(options?: ScrollToOptions): void;
+declare function scroll(x: number, y: number): void;
+declare function scrollBy(options?: ScrollToOptions): void;
+declare function scrollBy(x: number, y: number): void;
+declare function scrollTo(options?: ScrollToOptions): void;
+declare function scrollTo(x: number, y: number): void;
+declare function stop(): void;
+declare function webkitCancelAnimationFrame(handle: number): void;
+declare function webkitConvertPointFromNodeToPage(node: Node, pt: WebKitPoint): WebKitPoint;
+declare function webkitConvertPointFromPageToNode(node: Node, pt: WebKitPoint): WebKitPoint;
+declare function webkitRequestAnimationFrame(callback: FrameRequestCallback): number;
+declare function toString(): string;
+/**
+ * Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
+ */
+declare function dispatchEvent(event: Event): boolean;
+declare var sessionStorage: Storage;
+declare var localStorage: Storage;
+/**
+ * Fires when the user aborts the download.
+ * @param ev The event.
+ */
+declare var onabort: ((this: Window, ev: UIEvent) => any) | null;
+declare var onanimationcancel: ((this: Window, ev: AnimationEvent) => any) | null;
+declare var onanimationend: ((this: Window, ev: AnimationEvent) => any) | null;
+declare var onanimationiteration: ((this: Window, ev: AnimationEvent) => any) | null;
+declare var onanimationstart: ((this: Window, ev: AnimationEvent) => any) | null;
+declare var onauxclick: ((this: Window, ev: MouseEvent) => any) | null;
+/**
+ * Fires when the object loses the input focus.
+ * @param ev The focus event.
+ */
+declare var onblur: ((this: Window, ev: FocusEvent) => any) | null;
+declare var oncancel: ((this: Window, ev: Event) => any) | null;
+/**
+ * Occurs when playback is possible, but would require further buffering.
+ * @param ev The event.
+ */
+declare var oncanplay: ((this: Window, ev: Event) => any) | null;
+declare var oncanplaythrough: ((this: Window, ev: Event) => any) | null;
+/**
+ * Fires when the contents of the object or selection have changed.
+ * @param ev The event.
+ */
+declare var onchange: ((this: Window, ev: Event) => any) | null;
+/**
+ * Fires when the user clicks the left mouse button on the object
+ * @param ev The mouse event.
+ */
+declare var onclick: ((this: Window, ev: MouseEvent) => any) | null;
+declare var onclose: ((this: Window, ev: Event) => any) | null;
+/**
+ * Fires when the user clicks the right mouse button in the client area, opening the context menu.
+ * @param ev The mouse event.
+ */
+declare var oncontextmenu: ((this: Window, ev: MouseEvent) => any) | null;
+declare var oncuechange: ((this: Window, ev: Event) => any) | null;
+/**
+ * Fires when the user double-clicks the object.
+ * @param ev The mouse event.
+ */
+declare var ondblclick: ((this: Window, ev: MouseEvent) => any) | null;
+/**
+ * Fires on the source object continuously during a drag operation.
+ * @param ev The event.
+ */
+declare var ondrag: ((this: Window, ev: DragEvent) => any) | null;
+/**
+ * Fires on the source object when the user releases the mouse at the close of a drag operation.
+ * @param ev The event.
+ */
+declare var ondragend: ((this: Window, ev: DragEvent) => any) | null;
+/**
+ * Fires on the target element when the user drags the object to a valid drop target.
+ * @param ev The drag event.
+ */
+declare var ondragenter: ((this: Window, ev: DragEvent) => any) | null;
+declare var ondragexit: ((this: Window, ev: Event) => any) | null;
+/**
+ * Fires on the target object when the user moves the mouse out of a valid drop target during a drag operation.
+ * @param ev The drag event.
+ */
+declare var ondragleave: ((this: Window, ev: DragEvent) => any) | null;
+/**
+ * Fires on the target element continuously while the user drags the object over a valid drop target.
+ * @param ev The event.
+ */
+declare var ondragover: ((this: Window, ev: DragEvent) => any) | null;
+/**
+ * Fires on the source object when the user starts to drag a text selection or selected object.
+ * @param ev The event.
+ */
+declare var ondragstart: ((this: Window, ev: DragEvent) => any) | null;
+declare var ondrop: ((this: Window, ev: DragEvent) => any) | null;
+/**
+ * Occurs when the duration attribute is updated.
+ * @param ev The event.
+ */
+declare var ondurationchange: ((this: Window, ev: Event) => any) | null;
+/**
+ * Occurs when the media element is reset to its initial state.
+ * @param ev The event.
+ */
+declare var onemptied: ((this: Window, ev: Event) => any) | null;
+/**
+ * Occurs when the end of playback is reached.
+ * @param ev The event
+ */
+declare var onended: ((this: Window, ev: Event) => any) | null;
+/**
+ * Fires when an error occurs during object loading.
+ * @param ev The event.
+ */
+declare var onerror: OnErrorEventHandler;
+/**
+ * Fires when the object receives focus.
+ * @param ev The event.
+ */
+declare var onfocus: ((this: Window, ev: FocusEvent) => any) | null;
+declare var ongotpointercapture: ((this: Window, ev: PointerEvent) => any) | null;
+declare var oninput: ((this: Window, ev: Event) => any) | null;
+declare var oninvalid: ((this: Window, ev: Event) => any) | null;
+/**
+ * Fires when the user presses a key.
+ * @param ev The keyboard event
+ */
+declare var onkeydown: ((this: Window, ev: KeyboardEvent) => any) | null;
+/**
+ * Fires when the user presses an alphanumeric key.
+ * @param ev The event.
+ */
+declare var onkeypress: ((this: Window, ev: KeyboardEvent) => any) | null;
+/**
+ * Fires when the user releases a key.
+ * @param ev The keyboard event
+ */
+declare var onkeyup: ((this: Window, ev: KeyboardEvent) => any) | null;
+/**
+ * Fires immediately after the browser loads the object.
+ * @param ev The event.
+ */
+declare var onload: ((this: Window, ev: Event) => any) | null;
+/**
+ * Occurs when media data is loaded at the current playback position.
+ * @param ev The event.
+ */
+declare var onloadeddata: ((this: Window, ev: Event) => any) | null;
+/**
+ * Occurs when the duration and dimensions of the media have been determined.
+ * @param ev The event.
+ */
+declare var onloadedmetadata: ((this: Window, ev: Event) => any) | null;
+/**
+ * Occurs when Internet Explorer begins looking for media data.
+ * @param ev The event.
+ */
+declare var onloadstart: ((this: Window, ev: Event) => any) | null;
+declare var onlostpointercapture: ((this: Window, ev: PointerEvent) => any) | null;
+/**
+ * Fires when the user clicks the object with either mouse button.
+ * @param ev The mouse event.
+ */
+declare var onmousedown: ((this: Window, ev: MouseEvent) => any) | null;
+declare var onmouseenter: ((this: Window, ev: MouseEvent) => any) | null;
+declare var onmouseleave: ((this: Window, ev: MouseEvent) => any) | null;
+/**
+ * Fires when the user moves the mouse over the object.
+ * @param ev The mouse event.
+ */
+declare var onmousemove: ((this: Window, ev: MouseEvent) => any) | null;
+/**
+ * Fires when the user moves the mouse pointer outside the boundaries of the object.
+ * @param ev The mouse event.
+ */
+declare var onmouseout: ((this: Window, ev: MouseEvent) => any) | null;
+/**
+ * Fires when the user moves the mouse pointer into the object.
+ * @param ev The mouse event.
+ */
+declare var onmouseover: ((this: Window, ev: MouseEvent) => any) | null;
+/**
+ * Fires when the user releases a mouse button while the mouse is over the object.
+ * @param ev The mouse event.
+ */
+declare var onmouseup: ((this: Window, ev: MouseEvent) => any) | null;
+/**
+ * Occurs when playback is paused.
+ * @param ev The event.
+ */
+declare var onpause: ((this: Window, ev: Event) => any) | null;
+/**
+ * Occurs when the play method is requested.
+ * @param ev The event.
+ */
+declare var onplay: ((this: Window, ev: Event) => any) | null;
+/**
+ * Occurs when the audio or video has started playing.
+ * @param ev The event.
+ */
+declare var onplaying: ((this: Window, ev: Event) => any) | null;
+declare var onpointercancel: ((this: Window, ev: PointerEvent) => any) | null;
+declare var onpointerdown: ((this: Window, ev: PointerEvent) => any) | null;
+declare var onpointerenter: ((this: Window, ev: PointerEvent) => any) | null;
+declare var onpointerleave: ((this: Window, ev: PointerEvent) => any) | null;
+declare var onpointermove: ((this: Window, ev: PointerEvent) => any) | null;
+declare var onpointerout: ((this: Window, ev: PointerEvent) => any) | null;
+declare var onpointerover: ((this: Window, ev: PointerEvent) => any) | null;
+declare var onpointerup: ((this: Window, ev: PointerEvent) => any) | null;
+/**
+ * Occurs to indicate progress while downloading media data.
+ * @param ev The event.
+ */
+declare var onprogress: ((this: Window, ev: ProgressEvent) => any) | null;
+/**
+ * Occurs when the playback rate is increased or decreased.
+ * @param ev The event.
+ */
+declare var onratechange: ((this: Window, ev: Event) => any) | null;
+/**
+ * Fires when the user resets a form.
+ * @param ev The event.
+ */
+declare var onreset: ((this: Window, ev: Event) => any) | null;
+declare var onresize: ((this: Window, ev: UIEvent) => any) | null;
+/**
+ * Fires when the user repositions the scroll box in the scroll bar on the object.
+ * @param ev The event.
+ */
+declare var onscroll: ((this: Window, ev: Event) => any) | null;
+declare var onsecuritypolicyviolation: ((this: Window, ev: SecurityPolicyViolationEvent) => any) | null;
+/**
+ * Occurs when the seek operation ends.
+ * @param ev The event.
+ */
+declare var onseeked: ((this: Window, ev: Event) => any) | null;
+/**
+ * Occurs when the current playback position is moved.
+ * @param ev The event.
+ */
+declare var onseeking: ((this: Window, ev: Event) => any) | null;
+/**
+ * Fires when the current selection changes.
+ * @param ev The event.
+ */
+declare var onselect: ((this: Window, ev: Event) => any) | null;
+declare var onselectionchange: ((this: Window, ev: Event) => any) | null;
+declare var onselectstart: ((this: Window, ev: Event) => any) | null;
+/**
+ * Occurs when the download has stopped.
+ * @param ev The event.
+ */
+declare var onstalled: ((this: Window, ev: Event) => any) | null;
+declare var onsubmit: ((this: Window, ev: Event) => any) | null;
+/**
+ * Occurs if the load operation has been intentionally halted.
+ * @param ev The event.
+ */
+declare var onsuspend: ((this: Window, ev: Event) => any) | null;
+/**
+ * Occurs to indicate the current playback position.
+ * @param ev The event.
+ */
+declare var ontimeupdate: ((this: Window, ev: Event) => any) | null;
+declare var ontoggle: ((this: Window, ev: Event) => any) | null;
+declare var ontouchcancel: ((this: Window, ev: TouchEvent) => any) | null | undefined;
+declare var ontouchend: ((this: Window, ev: TouchEvent) => any) | null | undefined;
+declare var ontouchmove: ((this: Window, ev: TouchEvent) => any) | null | undefined;
+declare var ontouchstart: ((this: Window, ev: TouchEvent) => any) | null | undefined;
+declare var ontransitioncancel: ((this: Window, ev: TransitionEvent) => any) | null;
+declare var ontransitionend: ((this: Window, ev: TransitionEvent) => any) | null;
+declare var ontransitionrun: ((this: Window, ev: TransitionEvent) => any) | null;
+declare var ontransitionstart: ((this: Window, ev: TransitionEvent) => any) | null;
+/**
+ * Occurs when the volume is changed, or playback is muted or unmuted.
+ * @param ev The event.
+ */
+declare var onvolumechange: ((this: Window, ev: Event) => any) | null;
+/**
+ * Occurs when playback stops because the next frame of a video resource is not available.
+ * @param ev The event.
+ */
+declare var onwaiting: ((this: Window, ev: Event) => any) | null;
+declare var onwheel: ((this: Window, ev: WheelEvent) => any) | null;
+declare function cancelAnimationFrame(handle: number): void;
+declare function requestAnimationFrame(callback: FrameRequestCallback): number;
+declare var caches: CacheStorage;
+declare var crypto: Crypto;
+declare var indexedDB: IDBFactory;
+declare var isSecureContext: boolean;
+declare var origin: string;
+declare var performance: Performance;
+declare function atob(data: string): string;
+declare function btoa(data: string): string;
+declare function clearInterval(handle?: number): void;
+declare function clearTimeout(handle?: number): void;
+declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
+declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
+declare function fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
+declare function queueMicrotask(callback: VoidFunction): void;
+declare function setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
+declare function setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
+declare var onafterprint: ((this: Window, ev: Event) => any) | null;
+declare var onbeforeprint: ((this: Window, ev: Event) => any) | null;
+declare var onbeforeunload: ((this: Window, ev: BeforeUnloadEvent) => any) | null;
+declare var onhashchange: ((this: Window, ev: HashChangeEvent) => any) | null;
+declare var onlanguagechange: ((this: Window, ev: Event) => any) | null;
+declare var onmessage: ((this: Window, ev: MessageEvent) => any) | null;
+declare var onmessageerror: ((this: Window, ev: MessageEvent) => any) | null;
+declare var onoffline: ((this: Window, ev: Event) => any) | null;
+declare var ononline: ((this: Window, ev: Event) => any) | null;
+declare var onpagehide: ((this: Window, ev: PageTransitionEvent) => any) | null;
+declare var onpageshow: ((this: Window, ev: PageTransitionEvent) => any) | null;
+declare var onpopstate: ((this: Window, ev: PopStateEvent) => any) | null;
+declare var onrejectionhandled: ((this: Window, ev: PromiseRejectionEvent) => any) | null;
+declare var onstorage: ((this: Window, ev: StorageEvent) => any) | null;
+declare var onunhandledrejection: ((this: Window, ev: PromiseRejectionEvent) => any) | null;
+declare var onunload: ((this: Window, ev: Event) => any) | null;
+declare function addEventListener<K extends keyof WindowEventMap>(type: K, listener: (this: Window, ev: WindowEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+declare function removeEventListener<K extends keyof WindowEventMap>(type: K, listener: (this: Window, ev: WindowEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+declare function removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+type HeadersInit = Headers | string[][] | Record<string, string>;
+type BodyInit = Blob | BufferSource | FormData | URLSearchParams | ReadableStream<Uint8Array> | string;
+type RequestInfo = Request | string;
+type BlobPart = BufferSource | Blob | string;
+type DOMHighResTimeStamp = number;
+type RenderingContext = CanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext;
+type HTMLOrSVGImageElement = HTMLImageElement | SVGImageElement;
+type CanvasImageSource = HTMLOrSVGImageElement | HTMLVideoElement | HTMLCanvasElement | ImageBitmap | OffscreenCanvas;
+type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext;
+type MessageEventSource = WindowProxy | MessagePort | ServiceWorker;
+type HTMLOrSVGScriptElement = HTMLScriptElement | SVGScriptElement;
+type ImageBitmapSource = CanvasImageSource | Blob | ImageData;
+type MediaProvider = MediaStream | MediaSource | Blob;
+type OnErrorEventHandler = OnErrorEventHandlerNonNull | null;
+type OnBeforeUnloadEventHandler = OnBeforeUnloadEventHandlerNonNull | null;
+type TimerHandler = string | Function;
+type ConstrainULong = number | ConstrainULongRange;
+type ConstrainDouble = number | ConstrainDoubleRange;
+type ConstrainBoolean = boolean | ConstrainBooleanParameters;
+type ConstrainDOMString = string | string[] | ConstrainDOMStringParameters;
+type PerformanceEntryList = PerformanceEntry[];
+type ReadableStreamReadResult<T> = ReadableStreamReadValueResult<T> | ReadableStreamReadDoneResult<T>;
+type VibratePattern = number | number[];
+type COSEAlgorithmIdentifier = number;
+type AuthenticatorSelectionList = AAGUID[];
+type AAGUID = BufferSource;
+type AuthenticationExtensionsSupported = string[];
+type UvmEntry = number[];
+type UvmEntries = UvmEntry[];
+type AlgorithmIdentifier = string | Algorithm;
+type HashAlgorithmIdentifier = AlgorithmIdentifier;
+type BigInteger = Uint8Array;
+type NamedCurve = string;
+type GLenum = number;
+type GLboolean = boolean;
+type GLbitfield = number;
+type GLint = number;
+type GLsizei = number;
+type GLintptr = number;
+type GLsizeiptr = number;
+type GLuint = number;
+type GLfloat = number;
+type GLclampf = number;
+type TexImageSource = ImageBitmap | ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | OffscreenCanvas;
+type Float32List = Float32Array | GLfloat[];
+type Int32List = Int32Array | GLint[];
+type GLint64 = number;
+type GLuint64 = number;
+type Uint32List = Uint32Array | GLuint[];
+type BufferSource = ArrayBufferView | ArrayBuffer;
+type DOMTimeStamp = number;
+type LineAndPositionSetting = number | AutoKeyword;
+type FormDataEntryValue = File | string;
+type InsertPosition = "beforebegin" | "afterbegin" | "beforeend" | "afterend";
+type IDBValidKey = number | string | Date | BufferSource | IDBArrayKey;
+type MutationRecordType = "attributes" | "characterData" | "childList";
+type IDBKeyPath = string;
+type Transferable = ArrayBuffer | MessagePort | ImageBitmap | OffscreenCanvas;
+type RTCIceGatherCandidate = RTCIceCandidateDictionary | RTCIceCandidateComplete;
+type RTCTransport = RTCDtlsTransport | RTCSrtpSdesTransport;
+/** @deprecated */
+type MouseWheelEvent = WheelEvent;
+type WindowProxy = Window;
+type AlignSetting = "center" | "end" | "left" | "right" | "start";
+type AnimationPlayState = "finished" | "idle" | "paused" | "running";
+type AppendMode = "segments" | "sequence";
+type AttestationConveyancePreference = "direct" | "indirect" | "none";
+type AudioContextLatencyCategory = "balanced" | "interactive" | "playback";
+type AudioContextState = "closed" | "running" | "suspended";
+type AuthenticatorAttachment = "cross-platform" | "platform";
+type AuthenticatorTransport = "ble" | "internal" | "nfc" | "usb";
+type AutoKeyword = "auto";
+type AutomationRate = "a-rate" | "k-rate";
+type BinaryType = "arraybuffer" | "blob";
+type BiquadFilterType = "allpass" | "bandpass" | "highpass" | "highshelf" | "lowpass" | "lowshelf" | "notch" | "peaking";
+type CanPlayTypeResult = "" | "maybe" | "probably";
+type CanvasDirection = "inherit" | "ltr" | "rtl";
+type CanvasFillRule = "evenodd" | "nonzero";
+type CanvasLineCap = "butt" | "round" | "square";
+type CanvasLineJoin = "bevel" | "miter" | "round";
+type CanvasTextAlign = "center" | "end" | "left" | "right" | "start";
+type CanvasTextBaseline = "alphabetic" | "bottom" | "hanging" | "ideographic" | "middle" | "top";
+type ChannelCountMode = "clamped-max" | "explicit" | "max";
+type ChannelInterpretation = "discrete" | "speakers";
+type ClientTypes = "all" | "sharedworker" | "window" | "worker";
+type ColorSpaceConversion = "default" | "none";
+type CompositeOperation = "accumulate" | "add" | "replace";
+type CompositeOperationOrAuto = "accumulate" | "add" | "auto" | "replace";
+type CredentialMediationRequirement = "optional" | "required" | "silent";
+type DirectionSetting = "" | "lr" | "rl";
+type DisplayCaptureSurfaceType = "application" | "browser" | "monitor" | "window";
+type DistanceModelType = "exponential" | "inverse" | "linear";
+type DocumentReadyState = "complete" | "interactive" | "loading";
+type EndOfStreamError = "decode" | "network";
+type EndingType = "native" | "transparent";
+type FillMode = "auto" | "backwards" | "both" | "forwards" | "none";
+type FullscreenNavigationUI = "auto" | "hide" | "show";
+type GamepadHand = "" | "left" | "right";
+type GamepadHapticActuatorType = "vibration";
+type GamepadMappingType = "" | "standard";
+type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique";
+type IDBRequestReadyState = "done" | "pending";
+type IDBTransactionMode = "readonly" | "readwrite" | "versionchange";
+type ImageOrientation = "flipY" | "none";
+type ImageSmoothingQuality = "high" | "low" | "medium";
+type IterationCompositeOperation = "accumulate" | "replace";
+type KeyFormat = "jwk" | "pkcs8" | "raw" | "spki";
+type KeyType = "private" | "public" | "secret";
+type KeyUsage = "decrypt" | "deriveBits" | "deriveKey" | "encrypt" | "sign" | "unwrapKey" | "verify" | "wrapKey";
+type LineAlignSetting = "center" | "end" | "start";
+type ListeningState = "active" | "disambiguation" | "inactive";
+type MSCredentialType = "FIDO_2_0";
+type MSTransportType = "BT" | "Embedded" | "NFC" | "USB";
+type MSWebViewPermissionState = "allow" | "defer" | "deny" | "unknown";
+type MSWebViewPermissionType = "geolocation" | "media" | "pointerlock" | "unlimitedIndexedDBQuota" | "webnotifications";
+type MediaDeviceKind = "audioinput" | "audiooutput" | "videoinput";
+type MediaKeyMessageType = "individualization-request" | "license-release" | "license-renewal" | "license-request";
+type MediaKeySessionType = "persistent-license" | "temporary";
+type MediaKeyStatus = "expired" | "internal-error" | "output-downscaled" | "output-restricted" | "released" | "status-pending" | "usable";
+type MediaKeysRequirement = "not-allowed" | "optional" | "required";
+type MediaStreamTrackState = "ended" | "live";
+type NavigationReason = "down" | "left" | "right" | "up";
+type NavigationType = "back_forward" | "navigate" | "prerender" | "reload";
+type NotificationDirection = "auto" | "ltr" | "rtl";
+type NotificationPermission = "default" | "denied" | "granted";
+type OffscreenRenderingContextId = "2d" | "bitmaprenderer" | "webgl" | "webgl2";
+type OrientationLockType = "any" | "landscape" | "landscape-primary" | "landscape-secondary" | "natural" | "portrait" | "portrait-primary" | "portrait-secondary";
+type OrientationType = "landscape-primary" | "landscape-secondary" | "portrait-primary" | "portrait-secondary";
+type OscillatorType = "custom" | "sawtooth" | "sine" | "square" | "triangle";
+type OverSampleType = "2x" | "4x" | "none";
+type PanningModelType = "HRTF" | "equalpower";
+type PaymentComplete = "fail" | "success" | "unknown";
+type PaymentShippingType = "delivery" | "pickup" | "shipping";
+type PermissionName = "accelerometer" | "ambient-light-sensor" | "background-sync" | "bluetooth" | "camera" | "clipboard" | "device-info" | "geolocation" | "gyroscope" | "magnetometer" | "microphone" | "midi" | "notifications" | "persistent-storage" | "push" | "speaker";
+type PermissionState = "denied" | "granted" | "prompt";
+type PlaybackDirection = "alternate" | "alternate-reverse" | "normal" | "reverse";
+type PositionAlignSetting = "auto" | "center" | "line-left" | "line-right";
+type PremultiplyAlpha = "default" | "none" | "premultiply";
+type PublicKeyCredentialType = "public-key";
+type PushEncryptionKeyName = "auth" | "p256dh";
+type PushPermissionState = "denied" | "granted" | "prompt";
+type RTCBundlePolicy = "balanced" | "max-bundle" | "max-compat";
+type RTCDataChannelState = "closed" | "closing" | "connecting" | "open";
+type RTCDegradationPreference = "balanced" | "maintain-framerate" | "maintain-resolution";
+type RTCDtlsRole = "auto" | "client" | "server";
+type RTCDtlsTransportState = "closed" | "connected" | "connecting" | "failed" | "new";
+type RTCDtxStatus = "disabled" | "enabled";
+type RTCErrorDetailType = "data-channel-failure" | "dtls-failure" | "fingerprint-failure" | "hardware-encoder-error" | "hardware-encoder-not-available" | "idp-bad-script-failure" | "idp-execution-failure" | "idp-load-failure" | "idp-need-login" | "idp-timeout" | "idp-tls-failure" | "idp-token-expired" | "idp-token-invalid" | "sctp-failure" | "sdp-syntax-error";
+type RTCIceCandidateType = "host" | "prflx" | "relay" | "srflx";
+type RTCIceComponent = "rtcp" | "rtp";
+type RTCIceConnectionState = "checking" | "closed" | "completed" | "connected" | "disconnected" | "failed" | "new";
+type RTCIceCredentialType = "oauth" | "password";
+type RTCIceGatherPolicy = "all" | "nohost" | "relay";
+type RTCIceGathererState = "complete" | "gathering" | "new";
+type RTCIceGatheringState = "complete" | "gathering" | "new";
+type RTCIceProtocol = "tcp" | "udp";
+type RTCIceRole = "controlled" | "controlling" | "unknown";
+type RTCIceTcpCandidateType = "active" | "passive" | "so";
+type RTCIceTransportPolicy = "all" | "relay";
+type RTCIceTransportState = "checking" | "closed" | "completed" | "connected" | "disconnected" | "failed" | "new";
+type RTCPeerConnectionState = "closed" | "connected" | "connecting" | "disconnected" | "failed" | "new";
+type RTCPriorityType = "high" | "low" | "medium" | "very-low";
+type RTCRtcpMuxPolicy = "negotiate" | "require";
+type RTCRtpTransceiverDirection = "inactive" | "recvonly" | "sendonly" | "sendrecv" | "stopped";
+type RTCSctpTransportState = "closed" | "connected" | "connecting";
+type RTCSdpType = "answer" | "offer" | "pranswer" | "rollback";
+type RTCSignalingState = "closed" | "have-local-offer" | "have-local-pranswer" | "have-remote-offer" | "have-remote-pranswer" | "stable";
+type RTCStatsIceCandidatePairState = "cancelled" | "failed" | "frozen" | "inprogress" | "succeeded" | "waiting";
+type RTCStatsIceCandidateType = "host" | "peerreflexive" | "relayed" | "serverreflexive";
+type RTCStatsType = "candidatepair" | "datachannel" | "inboundrtp" | "localcandidate" | "outboundrtp" | "remotecandidate" | "session" | "track" | "transport";
+type ReadyState = "closed" | "ended" | "open";
+type ReferrerPolicy = "" | "no-referrer" | "no-referrer-when-downgrade" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url";
+type RequestCache = "default" | "force-cache" | "no-cache" | "no-store" | "only-if-cached" | "reload";
+type RequestCredentials = "include" | "omit" | "same-origin";
+type RequestDestination = "" | "audio" | "audioworklet" | "document" | "embed" | "font" | "image" | "manifest" | "object" | "paintworklet" | "report" | "script" | "sharedworker" | "style" | "track" | "video" | "worker" | "xslt";
+type RequestMode = "cors" | "navigate" | "no-cors" | "same-origin";
+type RequestRedirect = "error" | "follow" | "manual";
+type ResizeQuality = "high" | "low" | "medium" | "pixelated";
+type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect";
+type ScopedCredentialType = "ScopedCred";
+type ScrollBehavior = "auto" | "smooth";
+type ScrollLogicalPosition = "center" | "end" | "nearest" | "start";
+type ScrollRestoration = "auto" | "manual";
+type ScrollSetting = "" | "up";
+type SelectionMode = "end" | "preserve" | "select" | "start";
+type ServiceWorkerState = "activated" | "activating" | "installed" | "installing" | "parsed" | "redundant";
+type ServiceWorkerUpdateViaCache = "all" | "imports" | "none";
+type ShadowRootMode = "closed" | "open";
+type SpeechSynthesisErrorCode = "audio-busy" | "audio-hardware" | "canceled" | "interrupted" | "invalid-argument" | "language-unavailable" | "network" | "not-allowed" | "synthesis-failed" | "synthesis-unavailable" | "text-too-long" | "voice-unavailable";
+type SupportedType = "application/xhtml+xml" | "application/xml" | "image/svg+xml" | "text/html" | "text/xml";
+type TextTrackKind = "captions" | "chapters" | "descriptions" | "metadata" | "subtitles";
+type TextTrackMode = "disabled" | "hidden" | "showing";
+type TouchType = "direct" | "stylus";
+type Transport = "ble" | "nfc" | "usb";
+type UserVerificationRequirement = "discouraged" | "preferred" | "required";
+type VRDisplayEventReason = "mounted" | "navigation" | "requested" | "unmounted";
+type VideoFacingModeEnum = "environment" | "left" | "right" | "user";
+type VisibilityState = "hidden" | "visible";
+type WebGLPowerPreference = "default" | "high-performance" | "low-power";
+type WorkerType = "classic" | "module";
+type XMLHttpRequestResponseType = "" | "arraybuffer" | "blob" | "document" | "json" | "text";
diff --git a/cli/dts/lib.dom.iterable.d.ts b/cli/dts/lib.dom.iterable.d.ts
new file mode 100644
index 000000000..1200443b3
--- /dev/null
+++ b/cli/dts/lib.dom.iterable.d.ts
@@ -0,0 +1,344 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/////////////////////////////
+/// DOM Iterable APIs
+/////////////////////////////
+
+interface AudioParam {
+ setValueCurveAtTime(values: Iterable<number>, startTime: number, duration: number): AudioParam;
+}
+
+interface AudioParamMap extends ReadonlyMap<string, AudioParam> {
+}
+
+interface BaseAudioContext {
+ createIIRFilter(feedforward: Iterable<number>, feedback: Iterable<number>): IIRFilterNode;
+ createPeriodicWave(real: Iterable<number>, imag: Iterable<number>, constraints?: PeriodicWaveConstraints): PeriodicWave;
+}
+
+interface CSSRuleList {
+ [Symbol.iterator](): IterableIterator<CSSRule>;
+}
+
+interface CSSStyleDeclaration {
+ [Symbol.iterator](): IterableIterator<string>;
+}
+
+interface Cache {
+ addAll(requests: Iterable<RequestInfo>): Promise<void>;
+}
+
+interface CanvasPathDrawingStyles {
+ setLineDash(segments: Iterable<number>): void;
+}
+
+interface ClientRectList {
+ [Symbol.iterator](): IterableIterator<ClientRect>;
+}
+
+interface DOMRectList {
+ [Symbol.iterator](): IterableIterator<DOMRect>;
+}
+
+interface DOMStringList {
+ [Symbol.iterator](): IterableIterator<string>;
+}
+
+interface DOMTokenList {
+ [Symbol.iterator](): IterableIterator<string>;
+ entries(): IterableIterator<[number, string]>;
+ keys(): IterableIterator<number>;
+ values(): IterableIterator<string>;
+}
+
+interface DataTransferItemList {
+ [Symbol.iterator](): IterableIterator<DataTransferItem>;
+}
+
+interface FileList {
+ [Symbol.iterator](): IterableIterator<File>;
+}
+
+interface FormData {
+ [Symbol.iterator](): IterableIterator<[string, FormDataEntryValue]>;
+ /**
+ * Returns an array of key, value pairs for every entry in the list.
+ */
+ entries(): IterableIterator<[string, FormDataEntryValue]>;
+ /**
+ * Returns a list of keys in the list.
+ */
+ keys(): IterableIterator<string>;
+ /**
+ * Returns a list of values in the list.
+ */
+ values(): IterableIterator<FormDataEntryValue>;
+}
+
+interface HTMLAllCollection {
+ [Symbol.iterator](): IterableIterator<Element>;
+}
+
+interface HTMLCollectionBase {
+ [Symbol.iterator](): IterableIterator<Element>;
+}
+
+interface HTMLCollectionOf<T extends Element> {
+ [Symbol.iterator](): IterableIterator<T>;
+}
+
+interface HTMLFormElement {
+ [Symbol.iterator](): IterableIterator<Element>;
+}
+
+interface HTMLSelectElement {
+ [Symbol.iterator](): IterableIterator<Element>;
+}
+
+interface Headers {
+ [Symbol.iterator](): IterableIterator<[string, string]>;
+ /**
+ * Returns an iterator allowing to go through all key/value pairs contained in this object.
+ */
+ entries(): IterableIterator<[string, string]>;
+ /**
+ * Returns an iterator allowing to go through all keys of the key/value pairs contained in this object.
+ */
+ keys(): IterableIterator<string>;
+ /**
+ * Returns an iterator allowing to go through all values of the key/value pairs contained in this object.
+ */
+ values(): IterableIterator<string>;
+}
+
+interface IDBObjectStore {
+ /**
+ * Creates a new index in store with the given name, keyPath and options and returns a new IDBIndex. If the keyPath and options define constraints that cannot be satisfied with the data already in store the upgrade transaction will abort with a "ConstraintError" DOMException.
+ *
+ * Throws an "InvalidStateError" DOMException if not called within an upgrade transaction.
+ */
+ createIndex(name: string, keyPath: string | Iterable<string>, options?: IDBIndexParameters): IDBIndex;
+}
+
+interface MediaKeyStatusMap {
+ [Symbol.iterator](): IterableIterator<[BufferSource, MediaKeyStatus]>;
+ entries(): IterableIterator<[BufferSource, MediaKeyStatus]>;
+ keys(): IterableIterator<BufferSource>;
+ values(): IterableIterator<MediaKeyStatus>;
+}
+
+interface MediaList {
+ [Symbol.iterator](): IterableIterator<string>;
+}
+
+interface MimeTypeArray {
+ [Symbol.iterator](): IterableIterator<MimeType>;
+}
+
+interface NamedNodeMap {
+ [Symbol.iterator](): IterableIterator<Attr>;
+}
+
+interface Navigator {
+ requestMediaKeySystemAccess(keySystem: string, supportedConfigurations: Iterable<MediaKeySystemConfiguration>): Promise<MediaKeySystemAccess>;
+}
+
+interface NodeList {
+ [Symbol.iterator](): IterableIterator<Node>;
+ /**
+ * Returns an array of key, value pairs for every entry in the list.
+ */
+ entries(): IterableIterator<[number, Node]>;
+ /**
+ * Returns an list of keys in the list.
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the list.
+ */
+ values(): IterableIterator<Node>;
+}
+
+interface NodeListOf<TNode extends Node> {
+ [Symbol.iterator](): IterableIterator<TNode>;
+ /**
+ * Returns an array of key, value pairs for every entry in the list.
+ */
+ entries(): IterableIterator<[number, TNode]>;
+ /**
+ * Returns an list of keys in the list.
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the list.
+ */
+ values(): IterableIterator<TNode>;
+}
+
+interface Plugin {
+ [Symbol.iterator](): IterableIterator<MimeType>;
+}
+
+interface PluginArray {
+ [Symbol.iterator](): IterableIterator<Plugin>;
+}
+
+interface RTCRtpTransceiver {
+ setCodecPreferences(codecs: Iterable<RTCRtpCodecCapability>): void;
+}
+
+interface RTCStatsReport extends ReadonlyMap<string, any> {
+}
+
+interface SVGLengthList {
+ [Symbol.iterator](): IterableIterator<SVGLength>;
+}
+
+interface SVGNumberList {
+ [Symbol.iterator](): IterableIterator<SVGNumber>;
+}
+
+interface SVGPointList {
+ [Symbol.iterator](): IterableIterator<DOMPoint>;
+}
+
+interface SVGStringList {
+ [Symbol.iterator](): IterableIterator<string>;
+}
+
+interface SourceBufferList {
+ [Symbol.iterator](): IterableIterator<SourceBuffer>;
+}
+
+interface SpeechGrammarList {
+ [Symbol.iterator](): IterableIterator<SpeechGrammar>;
+}
+
+interface SpeechRecognitionResult {
+ [Symbol.iterator](): IterableIterator<SpeechRecognitionAlternative>;
+}
+
+interface SpeechRecognitionResultList {
+ [Symbol.iterator](): IterableIterator<SpeechRecognitionResult>;
+}
+
+interface StyleSheetList {
+ [Symbol.iterator](): IterableIterator<CSSStyleSheet>;
+}
+
+interface TextTrackCueList {
+ [Symbol.iterator](): IterableIterator<TextTrackCue>;
+}
+
+interface TextTrackList {
+ [Symbol.iterator](): IterableIterator<TextTrack>;
+}
+
+interface TouchList {
+ [Symbol.iterator](): IterableIterator<Touch>;
+}
+
+interface URLSearchParams {
+ [Symbol.iterator](): IterableIterator<[string, string]>;
+ /**
+ * Returns an array of key, value pairs for every entry in the search params.
+ */
+ entries(): IterableIterator<[string, string]>;
+ /**
+ * Returns a list of keys in the search params.
+ */
+ keys(): IterableIterator<string>;
+ /**
+ * Returns a list of values in the search params.
+ */
+ values(): IterableIterator<string>;
+}
+
+interface VRDisplay {
+ requestPresent(layers: Iterable<VRLayer>): Promise<void>;
+}
+
+interface WEBGL_draw_buffers {
+ drawBuffersWEBGL(buffers: Iterable<GLenum>): void;
+}
+
+interface WebAuthentication {
+ makeCredential(accountInformation: Account, cryptoParameters: Iterable<ScopedCredentialParameters>, attestationChallenge: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer | null, options?: ScopedCredentialOptions): Promise<ScopedCredentialInfo>;
+}
+
+interface WebGL2RenderingContextBase {
+ clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLfloat>, srcOffset?: GLuint): void;
+ clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLint>, srcOffset?: GLuint): void;
+ clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLuint>, srcOffset?: GLuint): void;
+ drawBuffers(buffers: Iterable<GLenum>): void;
+ getActiveUniforms(program: WebGLProgram, uniformIndices: Iterable<GLuint>, pname: GLenum): any;
+ getUniformIndices(program: WebGLProgram, uniformNames: Iterable<string>): Iterable<GLuint> | null;
+ invalidateFramebuffer(target: GLenum, attachments: Iterable<GLenum>): void;
+ invalidateSubFramebuffer(target: GLenum, attachments: Iterable<GLenum>, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
+ transformFeedbackVaryings(program: WebGLProgram, varyings: Iterable<string>, bufferMode: GLenum): void;
+ uniform1uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform2uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform3uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform4uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix3x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ vertexAttribI4iv(index: GLuint, values: Iterable<GLint>): void;
+ vertexAttribI4uiv(index: GLuint, values: Iterable<GLuint>): void;
+}
+
+interface WebGL2RenderingContextOverloads {
+ uniform1fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform1iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform2fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform2iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform3fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform3iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform4fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform4iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void;
+}
+
+interface WebGLRenderingContextBase {
+ vertexAttrib1fv(index: GLuint, values: Iterable<GLfloat>): void;
+ vertexAttrib2fv(index: GLuint, values: Iterable<GLfloat>): void;
+ vertexAttrib3fv(index: GLuint, values: Iterable<GLfloat>): void;
+ vertexAttrib4fv(index: GLuint, values: Iterable<GLfloat>): void;
+}
+
+interface WebGLRenderingContextOverloads {
+ uniform1fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void;
+ uniform1iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void;
+ uniform2fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void;
+ uniform2iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void;
+ uniform3fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void;
+ uniform3iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void;
+ uniform4fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void;
+ uniform4iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void;
+ uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable<GLfloat>): void;
+ uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable<GLfloat>): void;
+ uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable<GLfloat>): void;
+}
diff --git a/cli/dts/lib.es2015.collection.d.ts b/cli/dts/lib.es2015.collection.d.ts
new file mode 100644
index 000000000..dc154ca17
--- /dev/null
+++ b/cli/dts/lib.es2015.collection.d.ts
@@ -0,0 +1,89 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+interface Map<K, V> {
+ clear(): void;
+ delete(key: K): boolean;
+ forEach(callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: any): void;
+ get(key: K): V | undefined;
+ has(key: K): boolean;
+ set(key: K, value: V): this;
+ readonly size: number;
+}
+
+interface MapConstructor {
+ new(): Map<any, any>;
+ new<K, V>(entries?: readonly (readonly [K, V])[] | null): Map<K, V>;
+ readonly prototype: Map<any, any>;
+}
+declare var Map: MapConstructor;
+
+interface ReadonlyMap<K, V> {
+ forEach(callbackfn: (value: V, key: K, map: ReadonlyMap<K, V>) => void, thisArg?: any): void;
+ get(key: K): V | undefined;
+ has(key: K): boolean;
+ readonly size: number;
+}
+
+interface WeakMap<K extends object, V> {
+ delete(key: K): boolean;
+ get(key: K): V | undefined;
+ has(key: K): boolean;
+ set(key: K, value: V): this;
+}
+
+interface WeakMapConstructor {
+ new <K extends object = object, V = any>(entries?: readonly [K, V][] | null): WeakMap<K, V>;
+ readonly prototype: WeakMap<object, any>;
+}
+declare var WeakMap: WeakMapConstructor;
+
+interface Set<T> {
+ add(value: T): this;
+ clear(): void;
+ delete(value: T): boolean;
+ forEach(callbackfn: (value: T, value2: T, set: Set<T>) => void, thisArg?: any): void;
+ has(value: T): boolean;
+ readonly size: number;
+}
+
+interface SetConstructor {
+ new <T = any>(values?: readonly T[] | null): Set<T>;
+ readonly prototype: Set<any>;
+}
+declare var Set: SetConstructor;
+
+interface ReadonlySet<T> {
+ forEach(callbackfn: (value: T, value2: T, set: ReadonlySet<T>) => void, thisArg?: any): void;
+ has(value: T): boolean;
+ readonly size: number;
+}
+
+interface WeakSet<T extends object> {
+ add(value: T): this;
+ delete(value: T): boolean;
+ has(value: T): boolean;
+}
+
+interface WeakSetConstructor {
+ new <T extends object = object>(values?: readonly T[] | null): WeakSet<T>;
+ readonly prototype: WeakSet<object>;
+}
+declare var WeakSet: WeakSetConstructor;
diff --git a/cli/dts/lib.es2015.core.d.ts b/cli/dts/lib.es2015.core.d.ts
new file mode 100644
index 000000000..d8601c0ee
--- /dev/null
+++ b/cli/dts/lib.es2015.core.d.ts
@@ -0,0 +1,517 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+interface Array<T> {
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find<S extends T>(predicate: (this: void, value: T, index: number, obj: T[]) => value is S, thisArg?: any): S | undefined;
+ find(predicate: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): T | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): number;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: T, start?: number, end?: number): this;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+}
+
+interface ArrayConstructor {
+ /**
+ * Creates an array from an array-like object.
+ * @param arrayLike An array-like object to convert to an array.
+ */
+ from<T>(arrayLike: ArrayLike<T>): T[];
+
+ /**
+ * Creates an array from an iterable object.
+ * @param arrayLike An array-like object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of<T>(...items: T[]): T[];
+}
+
+interface DateConstructor {
+ new (value: number | string | Date): Date;
+}
+
+interface Function {
+ /**
+ * Returns the name of the function. Function names are read-only and can not be changed.
+ */
+ readonly name: string;
+}
+
+interface Math {
+ /**
+ * Returns the number of leading zero bits in the 32-bit binary representation of a number.
+ * @param x A numeric expression.
+ */
+ clz32(x: number): number;
+
+ /**
+ * Returns the result of 32-bit multiplication of two numbers.
+ * @param x First number
+ * @param y Second number
+ */
+ imul(x: number, y: number): number;
+
+ /**
+ * Returns the sign of the x, indicating whether x is positive, negative or zero.
+ * @param x The numeric expression to test
+ */
+ sign(x: number): number;
+
+ /**
+ * Returns the base 10 logarithm of a number.
+ * @param x A numeric expression.
+ */
+ log10(x: number): number;
+
+ /**
+ * Returns the base 2 logarithm of a number.
+ * @param x A numeric expression.
+ */
+ log2(x: number): number;
+
+ /**
+ * Returns the natural logarithm of 1 + x.
+ * @param x A numeric expression.
+ */
+ log1p(x: number): number;
+
+ /**
+ * Returns the result of (e^x - 1), which is an implementation-dependent approximation to
+ * subtracting 1 from the exponential function of x (e raised to the power of x, where e
+ * is the base of the natural logarithms).
+ * @param x A numeric expression.
+ */
+ expm1(x: number): number;
+
+ /**
+ * Returns the hyperbolic cosine of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ cosh(x: number): number;
+
+ /**
+ * Returns the hyperbolic sine of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ sinh(x: number): number;
+
+ /**
+ * Returns the hyperbolic tangent of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ tanh(x: number): number;
+
+ /**
+ * Returns the inverse hyperbolic cosine of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ acosh(x: number): number;
+
+ /**
+ * Returns the inverse hyperbolic sine of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ asinh(x: number): number;
+
+ /**
+ * Returns the inverse hyperbolic tangent of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ atanh(x: number): number;
+
+ /**
+ * Returns the square root of the sum of squares of its arguments.
+ * @param values Values to compute the square root for.
+ * If no arguments are passed, the result is +0.
+ * If there is only one argument, the result is the absolute value.
+ * If any argument is +Infinity or -Infinity, the result is +Infinity.
+ * If any argument is NaN, the result is NaN.
+ * If all arguments are either +0 or −0, the result is +0.
+ */
+ hypot(...values: number[]): number;
+
+ /**
+ * Returns the integral part of the a numeric expression, x, removing any fractional digits.
+ * If x is already an integer, the result is x.
+ * @param x A numeric expression.
+ */
+ trunc(x: number): number;
+
+ /**
+ * Returns the nearest single precision float representation of a number.
+ * @param x A numeric expression.
+ */
+ fround(x: number): number;
+
+ /**
+ * Returns an implementation-dependent approximation to the cube root of number.
+ * @param x A numeric expression.
+ */
+ cbrt(x: number): number;
+}
+
+interface NumberConstructor {
+ /**
+ * The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1
+ * that is representable as a Number value, which is approximately:
+ * 2.2204460492503130808472633361816 x 10‍−‍16.
+ */
+ readonly EPSILON: number;
+
+ /**
+ * Returns true if passed value is finite.
+ * Unlike the global isFinite, Number.isFinite doesn't forcibly convert the parameter to a
+ * number. Only finite values of the type number, result in true.
+ * @param number A numeric value.
+ */
+ isFinite(number: unknown): boolean;
+
+ /**
+ * Returns true if the value passed is an integer, false otherwise.
+ * @param number A numeric value.
+ */
+ isInteger(number: unknown): boolean;
+
+ /**
+ * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a
+ * number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter
+ * to a number. Only values of the type number, that are also NaN, result in true.
+ * @param number A numeric value.
+ */
+ isNaN(number: unknown): boolean;
+
+ /**
+ * Returns true if the value passed is a safe integer.
+ * @param number A numeric value.
+ */
+ isSafeInteger(number: unknown): boolean;
+
+ /**
+ * The value of the largest integer n such that n and n + 1 are both exactly representable as
+ * a Number value.
+ * The value of Number.MAX_SAFE_INTEGER is 9007199254740991 2^53 − 1.
+ */
+ readonly MAX_SAFE_INTEGER: number;
+
+ /**
+ * The value of the smallest integer n such that n and n − 1 are both exactly representable as
+ * a Number value.
+ * The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)).
+ */
+ readonly MIN_SAFE_INTEGER: number;
+
+ /**
+ * Converts a string to a floating-point number.
+ * @param string A string that contains a floating-point number.
+ */
+ parseFloat(string: string): number;
+
+ /**
+ * Converts A string to an integer.
+ * @param s A string to convert into a number.
+ * @param radix A value between 2 and 36 that specifies the base of the number in numString.
+ * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.
+ * All other strings are considered decimal.
+ */
+ parseInt(string: string, radix?: number): number;
+}
+
+interface ObjectConstructor {
+ /**
+ * Copy the values of all of the enumerable own properties from one or more source objects to a
+ * target object. Returns the target object.
+ * @param target The target object to copy to.
+ * @param source The source object from which to copy properties.
+ */
+ assign<T, U>(target: T, source: U): T & U;
+
+ /**
+ * Copy the values of all of the enumerable own properties from one or more source objects to a
+ * target object. Returns the target object.
+ * @param target The target object to copy to.
+ * @param source1 The first source object from which to copy properties.
+ * @param source2 The second source object from which to copy properties.
+ */
+ assign<T, U, V>(target: T, source1: U, source2: V): T & U & V;
+
+ /**
+ * Copy the values of all of the enumerable own properties from one or more source objects to a
+ * target object. Returns the target object.
+ * @param target The target object to copy to.
+ * @param source1 The first source object from which to copy properties.
+ * @param source2 The second source object from which to copy properties.
+ * @param source3 The third source object from which to copy properties.
+ */
+ assign<T, U, V, W>(target: T, source1: U, source2: V, source3: W): T & U & V & W;
+
+ /**
+ * Copy the values of all of the enumerable own properties from one or more source objects to a
+ * target object. Returns the target object.
+ * @param target The target object to copy to.
+ * @param sources One or more source objects from which to copy properties
+ */
+ assign(target: object, ...sources: any[]): any;
+
+ /**
+ * Returns an array of all symbol properties found directly on object o.
+ * @param o Object to retrieve the symbols from.
+ */
+ getOwnPropertySymbols(o: any): symbol[];
+
+ /**
+ * Returns the names of the enumerable string properties and methods of an object.
+ * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
+ */
+ keys(o: {}): string[];
+
+ /**
+ * Returns true if the values are the same value, false otherwise.
+ * @param value1 The first value.
+ * @param value2 The second value.
+ */
+ is(value1: any, value2: any): boolean;
+
+ /**
+ * Sets the prototype of a specified object o to object proto or null. Returns the object o.
+ * @param o The object to change its prototype.
+ * @param proto The value of the new prototype or null.
+ */
+ setPrototypeOf(o: any, proto: object | null): any;
+}
+
+interface ReadonlyArray<T> {
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find<S extends T>(predicate: (this: void, value: T, index: number, obj: readonly T[]) => value is S, thisArg?: any): S | undefined;
+ find(predicate: (value: T, index: number, obj: readonly T[]) => unknown, thisArg?: any): T | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (value: T, index: number, obj: readonly T[]) => unknown, thisArg?: any): number;
+}
+
+interface RegExp {
+ /**
+ * Returns a string indicating the flags of the regular expression in question. This field is read-only.
+ * The characters in this string are sequenced and concatenated in the following order:
+ *
+ * - "g" for global
+ * - "i" for ignoreCase
+ * - "m" for multiline
+ * - "u" for unicode
+ * - "y" for sticky
+ *
+ * If no flags are set, the value is the empty string.
+ */
+ readonly flags: string;
+
+ /**
+ * Returns a Boolean value indicating the state of the sticky flag (y) used with a regular
+ * expression. Default is false. Read-only.
+ */
+ readonly sticky: boolean;
+
+ /**
+ * Returns a Boolean value indicating the state of the Unicode flag (u) used with a regular
+ * expression. Default is false. Read-only.
+ */
+ readonly unicode: boolean;
+}
+
+interface RegExpConstructor {
+ new (pattern: RegExp | string, flags?: string): RegExp;
+ (pattern: RegExp | string, flags?: string): RegExp;
+}
+
+interface String {
+ /**
+ * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point
+ * value of the UTF-16 encoded code point starting at the string element at position pos in
+ * the String resulting from converting this object to a String.
+ * If there is no element at that position, the result is undefined.
+ * If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.
+ */
+ codePointAt(pos: number): number | undefined;
+
+ /**
+ * Returns true if searchString appears as a substring of the result of converting this
+ * object to a String, at one or more positions that are
+ * greater than or equal to position; otherwise, returns false.
+ * @param searchString search string
+ * @param position If position is undefined, 0 is assumed, so as to search all of the String.
+ */
+ includes(searchString: string, position?: number): boolean;
+
+ /**
+ * Returns true if the sequence of elements of searchString converted to a String is the
+ * same as the corresponding elements of this object (converted to a String) starting at
+ * endPosition – length(this). Otherwise returns false.
+ */
+ endsWith(searchString: string, endPosition?: number): boolean;
+
+ /**
+ * Returns the String value result of normalizing the string into the normalization form
+ * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.
+ * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default
+ * is "NFC"
+ */
+ normalize(form: "NFC" | "NFD" | "NFKC" | "NFKD"): string;
+
+ /**
+ * Returns the String value result of normalizing the string into the normalization form
+ * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.
+ * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default
+ * is "NFC"
+ */
+ normalize(form?: string): string;
+
+ /**
+ * Returns a String value that is made from count copies appended together. If count is 0,
+ * the empty string is returned.
+ * @param count number of copies to append
+ */
+ repeat(count: number): string;
+
+ /**
+ * Returns true if the sequence of elements of searchString converted to a String is the
+ * same as the corresponding elements of this object (converted to a String) starting at
+ * position. Otherwise returns false.
+ */
+ startsWith(searchString: string, position?: number): boolean;
+
+ /**
+ * Returns an <a> HTML anchor element and sets the name attribute to the text value
+ * @param name
+ */
+ anchor(name: string): string;
+
+ /** Returns a <big> HTML element */
+ big(): string;
+
+ /** Returns a <blink> HTML element */
+ blink(): string;
+
+ /** Returns a <b> HTML element */
+ bold(): string;
+
+ /** Returns a <tt> HTML element */
+ fixed(): string;
+
+ /** Returns a <font> HTML element and sets the color attribute value */
+ fontcolor(color: string): string;
+
+ /** Returns a <font> HTML element and sets the size attribute value */
+ fontsize(size: number): string;
+
+ /** Returns a <font> HTML element and sets the size attribute value */
+ fontsize(size: string): string;
+
+ /** Returns an <i> HTML element */
+ italics(): string;
+
+ /** Returns an <a> HTML element and sets the href attribute value */
+ link(url: string): string;
+
+ /** Returns a <small> HTML element */
+ small(): string;
+
+ /** Returns a <strike> HTML element */
+ strike(): string;
+
+ /** Returns a <sub> HTML element */
+ sub(): string;
+
+ /** Returns a <sup> HTML element */
+ sup(): string;
+}
+
+interface StringConstructor {
+ /**
+ * Return the String value whose elements are, in order, the elements in the List elements.
+ * If length is 0, the empty string is returned.
+ */
+ fromCodePoint(...codePoints: number[]): string;
+
+ /**
+ * String.raw is intended for use as a tag function of a Tagged Template String. When called
+ * as such the first argument will be a well formed template call site object and the rest
+ * parameter will contain the substitution values.
+ * @param template A well-formed template string call site representation.
+ * @param substitutions A set of substitution values.
+ */
+ raw(template: TemplateStringsArray, ...substitutions: any[]): string;
+}
diff --git a/cli/dts/lib.es2015.d.ts b/cli/dts/lib.es2015.d.ts
new file mode 100644
index 000000000..791284b6d
--- /dev/null
+++ b/cli/dts/lib.es2015.d.ts
@@ -0,0 +1,30 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es5" />
+/// <reference lib="es2015.core" />
+/// <reference lib="es2015.collection" />
+/// <reference lib="es2015.iterable" />
+/// <reference lib="es2015.generator" />
+/// <reference lib="es2015.promise" />
+/// <reference lib="es2015.proxy" />
+/// <reference lib="es2015.reflect" />
+/// <reference lib="es2015.symbol" />
+/// <reference lib="es2015.symbol.wellknown" />
diff --git a/cli/dts/lib.es2015.generator.d.ts b/cli/dts/lib.es2015.generator.d.ts
new file mode 100644
index 000000000..78f9fd5bd
--- /dev/null
+++ b/cli/dts/lib.es2015.generator.d.ts
@@ -0,0 +1,79 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2015.iterable" />
+
+interface Generator<T = unknown, TReturn = any, TNext = unknown> extends Iterator<T, TReturn, TNext> {
+ // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.
+ next(...args: [] | [TNext]): IteratorResult<T, TReturn>;
+ return(value: TReturn): IteratorResult<T, TReturn>;
+ throw(e: any): IteratorResult<T, TReturn>;
+ [Symbol.iterator](): Generator<T, TReturn, TNext>;
+}
+
+interface GeneratorFunction {
+ /**
+ * Creates a new Generator object.
+ * @param args A list of arguments the function accepts.
+ */
+ new (...args: any[]): Generator;
+ /**
+ * Creates a new Generator object.
+ * @param args A list of arguments the function accepts.
+ */
+ (...args: any[]): Generator;
+ /**
+ * The length of the arguments.
+ */
+ readonly length: number;
+ /**
+ * Returns the name of the function.
+ */
+ readonly name: string;
+ /**
+ * A reference to the prototype.
+ */
+ readonly prototype: Generator;
+}
+
+interface GeneratorFunctionConstructor {
+ /**
+ * Creates a new Generator function.
+ * @param args A list of arguments the function accepts.
+ */
+ new (...args: string[]): GeneratorFunction;
+ /**
+ * Creates a new Generator function.
+ * @param args A list of arguments the function accepts.
+ */
+ (...args: string[]): GeneratorFunction;
+ /**
+ * The length of the arguments.
+ */
+ readonly length: number;
+ /**
+ * Returns the name of the function.
+ */
+ readonly name: string;
+ /**
+ * A reference to the prototype.
+ */
+ readonly prototype: GeneratorFunction;
+}
diff --git a/cli/dts/lib.es2015.iterable.d.ts b/cli/dts/lib.es2015.iterable.d.ts
new file mode 100644
index 000000000..c2aae0617
--- /dev/null
+++ b/cli/dts/lib.es2015.iterable.d.ts
@@ -0,0 +1,509 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2015.symbol" />
+
+interface SymbolConstructor {
+ /**
+ * A method that returns the default iterator for an object. Called by the semantics of the
+ * for-of statement.
+ */
+ readonly iterator: symbol;
+}
+
+interface IteratorYieldResult<TYield> {
+ done?: false;
+ value: TYield;
+}
+
+interface IteratorReturnResult<TReturn> {
+ done: true;
+ value: TReturn;
+}
+
+type IteratorResult<T, TReturn = any> = IteratorYieldResult<T> | IteratorReturnResult<TReturn>;
+
+interface Iterator<T, TReturn = any, TNext = undefined> {
+ // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.
+ next(...args: [] | [TNext]): IteratorResult<T, TReturn>;
+ return?(value?: TReturn): IteratorResult<T, TReturn>;
+ throw?(e?: any): IteratorResult<T, TReturn>;
+}
+
+interface Iterable<T> {
+ [Symbol.iterator](): Iterator<T>;
+}
+
+interface IterableIterator<T> extends Iterator<T> {
+ [Symbol.iterator](): IterableIterator<T>;
+}
+
+interface Array<T> {
+ /** Iterator */
+ [Symbol.iterator](): IterableIterator<T>;
+
+ /**
+ * Returns an iterable of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, T]>;
+
+ /**
+ * Returns an iterable of keys in the array
+ */
+ keys(): IterableIterator<number>;
+
+ /**
+ * Returns an iterable of values in the array
+ */
+ values(): IterableIterator<T>;
+}
+
+interface ArrayConstructor {
+ /**
+ * Creates an array from an iterable object.
+ * @param iterable An iterable object to convert to an array.
+ */
+ from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
+
+ /**
+ * Creates an array from an iterable object.
+ * @param iterable An iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
+}
+
+interface ReadonlyArray<T> {
+ /** Iterator of values in the array. */
+ [Symbol.iterator](): IterableIterator<T>;
+
+ /**
+ * Returns an iterable of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, T]>;
+
+ /**
+ * Returns an iterable of keys in the array
+ */
+ keys(): IterableIterator<number>;
+
+ /**
+ * Returns an iterable of values in the array
+ */
+ values(): IterableIterator<T>;
+}
+
+interface IArguments {
+ /** Iterator */
+ [Symbol.iterator](): IterableIterator<any>;
+}
+
+interface Map<K, V> {
+ /** Returns an iterable of entries in the map. */
+ [Symbol.iterator](): IterableIterator<[K, V]>;
+
+ /**
+ * Returns an iterable of key, value pairs for every entry in the map.
+ */
+ entries(): IterableIterator<[K, V]>;
+
+ /**
+ * Returns an iterable of keys in the map
+ */
+ keys(): IterableIterator<K>;
+
+ /**
+ * Returns an iterable of values in the map
+ */
+ values(): IterableIterator<V>;
+}
+
+interface ReadonlyMap<K, V> {
+ /** Returns an iterable of entries in the map. */
+ [Symbol.iterator](): IterableIterator<[K, V]>;
+
+ /**
+ * Returns an iterable of key, value pairs for every entry in the map.
+ */
+ entries(): IterableIterator<[K, V]>;
+
+ /**
+ * Returns an iterable of keys in the map
+ */
+ keys(): IterableIterator<K>;
+
+ /**
+ * Returns an iterable of values in the map
+ */
+ values(): IterableIterator<V>;
+}
+
+interface MapConstructor {
+ new <K, V>(iterable: Iterable<readonly [K, V]>): Map<K, V>;
+}
+
+interface WeakMap<K extends object, V> { }
+
+interface WeakMapConstructor {
+ new <K extends object, V>(iterable: Iterable<[K, V]>): WeakMap<K, V>;
+}
+
+interface Set<T> {
+ /** Iterates over values in the set. */
+ [Symbol.iterator](): IterableIterator<T>;
+ /**
+ * Returns an iterable of [v,v] pairs for every value `v` in the set.
+ */
+ entries(): IterableIterator<[T, T]>;
+ /**
+ * Despite its name, returns an iterable of the values in the set,
+ */
+ keys(): IterableIterator<T>;
+
+ /**
+ * Returns an iterable of values in the set.
+ */
+ values(): IterableIterator<T>;
+}
+
+interface ReadonlySet<T> {
+ /** Iterates over values in the set. */
+ [Symbol.iterator](): IterableIterator<T>;
+
+ /**
+ * Returns an iterable of [v,v] pairs for every value `v` in the set.
+ */
+ entries(): IterableIterator<[T, T]>;
+
+ /**
+ * Despite its name, returns an iterable of the values in the set,
+ */
+ keys(): IterableIterator<T>;
+
+ /**
+ * Returns an iterable of values in the set.
+ */
+ values(): IterableIterator<T>;
+}
+
+interface SetConstructor {
+ new <T>(iterable?: Iterable<T> | null): Set<T>;
+}
+
+interface WeakSet<T extends object> { }
+
+interface WeakSetConstructor {
+ new <T extends object = object>(iterable: Iterable<T>): WeakSet<T>;
+}
+
+interface Promise<T> { }
+
+interface PromiseConstructor {
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An iterable of Promises.
+ * @returns A new Promise.
+ */
+ all<T>(values: Iterable<T | PromiseLike<T>>): Promise<T[]>;
+
+ /**
+ * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
+ * or rejected.
+ * @param values An iterable of Promises.
+ * @returns A new Promise.
+ */
+ race<T>(values: Iterable<T>): Promise<T extends PromiseLike<infer U> ? U : T>;
+
+ /**
+ * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
+ * or rejected.
+ * @param values An iterable of Promises.
+ * @returns A new Promise.
+ */
+ race<T>(values: Iterable<T | PromiseLike<T>>): Promise<T>;
+}
+
+declare namespace Reflect {
+ function enumerate(target: object): IterableIterator<any>;
+}
+
+interface String {
+ /** Iterator */
+ [Symbol.iterator](): IterableIterator<string>;
+}
+
+interface Int8Array {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Int8ArrayConstructor {
+ new (elements: Iterable<number>): Int8Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array;
+}
+
+interface Uint8Array {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Uint8ArrayConstructor {
+ new (elements: Iterable<number>): Uint8Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array;
+}
+
+interface Uint8ClampedArray {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Uint8ClampedArrayConstructor {
+ new (elements: Iterable<number>): Uint8ClampedArray;
+
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray;
+}
+
+interface Int16Array {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Int16ArrayConstructor {
+ new (elements: Iterable<number>): Int16Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array;
+}
+
+interface Uint16Array {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Uint16ArrayConstructor {
+ new (elements: Iterable<number>): Uint16Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array;
+}
+
+interface Int32Array {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Int32ArrayConstructor {
+ new (elements: Iterable<number>): Int32Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array;
+}
+
+interface Uint32Array {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Uint32ArrayConstructor {
+ new (elements: Iterable<number>): Uint32Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array;
+}
+
+interface Float32Array {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Float32ArrayConstructor {
+ new (elements: Iterable<number>): Float32Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array;
+}
+
+interface Float64Array {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Float64ArrayConstructor {
+ new (elements: Iterable<number>): Float64Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array;
+}
diff --git a/cli/dts/lib.es2015.promise.d.ts b/cli/dts/lib.es2015.promise.d.ts
new file mode 100644
index 000000000..68dcd8cfe
--- /dev/null
+++ b/cli/dts/lib.es2015.promise.d.ts
@@ -0,0 +1,150 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+interface PromiseConstructor {
+ /**
+ * A reference to the prototype.
+ */
+ readonly prototype: Promise<any>;
+
+ /**
+ * Creates a new Promise.
+ * @param executor A callback used to initialize the promise. This callback is passed two arguments:
+ * a resolve callback used to resolve the promise with a value or the result of another promise,
+ * and a reject callback used to reject the promise with a provided reason or error.
+ */
+ new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void): Promise<T>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(values: readonly [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>, T10 | PromiseLike<T10>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<T1, T2, T3, T4, T5, T6, T7, T8, T9>(values: readonly [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<T1, T2, T3, T4, T5, T6, T7, T8>(values: readonly [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<T1, T2, T3, T4, T5, T6, T7>(values: readonly [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>]): Promise<[T1, T2, T3, T4, T5, T6, T7]>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<T1, T2, T3, T4, T5, T6>(values: readonly [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>]): Promise<[T1, T2, T3, T4, T5, T6]>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<T1, T2, T3, T4, T5>(values: readonly [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>]): Promise<[T1, T2, T3, T4, T5]>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<T1, T2, T3, T4>(values: readonly [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>]): Promise<[T1, T2, T3, T4]>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<T1, T2, T3>(values: readonly [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>]): Promise<[T1, T2, T3]>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<T1, T2>(values: readonly [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]): Promise<[T1, T2]>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<T>(values: readonly (T | PromiseLike<T>)[]): Promise<T[]>;
+
+ // see: lib.es2015.iterable.d.ts
+ // all<T>(values: Iterable<T | PromiseLike<T>>): Promise<T[]>;
+
+ /**
+ * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
+ * or rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ race<T>(values: readonly T[]): Promise<T extends PromiseLike<infer U> ? U : T>;
+
+ // see: lib.es2015.iterable.d.ts
+ // race<T>(values: Iterable<T>): Promise<T extends PromiseLike<infer U> ? U : T>;
+
+ /**
+ * Creates a new rejected promise for the provided reason.
+ * @param reason The reason the promise was rejected.
+ * @returns A new rejected Promise.
+ */
+ reject<T = never>(reason?: any): Promise<T>;
+
+ /**
+ * Creates a new resolved promise for the provided value.
+ * @param value A promise.
+ * @returns A promise whose internal state matches the provided promise.
+ */
+ resolve<T>(value: T | PromiseLike<T>): Promise<T>;
+
+ /**
+ * Creates a new resolved promise .
+ * @returns A resolved promise.
+ */
+ resolve(): Promise<void>;
+}
+
+declare var Promise: PromiseConstructor;
diff --git a/cli/dts/lib.es2015.proxy.d.ts b/cli/dts/lib.es2015.proxy.d.ts
new file mode 100644
index 000000000..19e9d5aa6
--- /dev/null
+++ b/cli/dts/lib.es2015.proxy.d.ts
@@ -0,0 +1,42 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+interface ProxyHandler<T extends object> {
+ getPrototypeOf? (target: T): object | null;
+ setPrototypeOf? (target: T, v: any): boolean;
+ isExtensible? (target: T): boolean;
+ preventExtensions? (target: T): boolean;
+ getOwnPropertyDescriptor? (target: T, p: PropertyKey): PropertyDescriptor | undefined;
+ has? (target: T, p: PropertyKey): boolean;
+ get? (target: T, p: PropertyKey, receiver: any): any;
+ set? (target: T, p: PropertyKey, value: any, receiver: any): boolean;
+ deleteProperty? (target: T, p: PropertyKey): boolean;
+ defineProperty? (target: T, p: PropertyKey, attributes: PropertyDescriptor): boolean;
+ enumerate? (target: T): PropertyKey[];
+ ownKeys? (target: T): PropertyKey[];
+ apply? (target: T, thisArg: any, argArray?: any): any;
+ construct? (target: T, argArray: any, newTarget?: any): object;
+}
+
+interface ProxyConstructor {
+ revocable<T extends object>(target: T, handler: ProxyHandler<T>): { proxy: T; revoke: () => void; };
+ new <T extends object>(target: T, handler: ProxyHandler<T>): T;
+}
+declare var Proxy: ProxyConstructor;
diff --git a/cli/dts/lib.es2015.reflect.d.ts b/cli/dts/lib.es2015.reflect.d.ts
new file mode 100644
index 000000000..b6057e6a6
--- /dev/null
+++ b/cli/dts/lib.es2015.reflect.d.ts
@@ -0,0 +1,35 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+declare namespace Reflect {
+ function apply(target: Function, thisArgument: any, argumentsList: ArrayLike<any>): any;
+ function construct(target: Function, argumentsList: ArrayLike<any>, newTarget?: any): any;
+ function defineProperty(target: object, propertyKey: PropertyKey, attributes: PropertyDescriptor): boolean;
+ function deleteProperty(target: object, propertyKey: PropertyKey): boolean;
+ function get(target: object, propertyKey: PropertyKey, receiver?: any): any;
+ function getOwnPropertyDescriptor(target: object, propertyKey: PropertyKey): PropertyDescriptor | undefined;
+ function getPrototypeOf(target: object): object;
+ function has(target: object, propertyKey: PropertyKey): boolean;
+ function isExtensible(target: object): boolean;
+ function ownKeys(target: object): PropertyKey[];
+ function preventExtensions(target: object): boolean;
+ function set(target: object, propertyKey: PropertyKey, value: any, receiver?: any): boolean;
+ function setPrototypeOf(target: object, proto: any): boolean;
+}
diff --git a/cli/dts/lib.es2015.symbol.d.ts b/cli/dts/lib.es2015.symbol.d.ts
new file mode 100644
index 000000000..253d2806c
--- /dev/null
+++ b/cli/dts/lib.es2015.symbol.d.ts
@@ -0,0 +1,48 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+interface SymbolConstructor {
+ /**
+ * A reference to the prototype.
+ */
+ readonly prototype: Symbol;
+
+ /**
+ * Returns a new unique Symbol value.
+ * @param description Description of the new Symbol object.
+ */
+ (description?: string | number): symbol;
+
+ /**
+ * Returns a Symbol object from the global symbol registry matching the given key if found.
+ * Otherwise, returns a new symbol with this key.
+ * @param key key to search for.
+ */
+ for(key: string): symbol;
+
+ /**
+ * Returns a key from the global symbol registry matching the given Symbol if found.
+ * Otherwise, returns a undefined.
+ * @param sym Symbol to find the key for.
+ */
+ keyFor(sym: symbol): string | undefined;
+}
+
+declare var Symbol: SymbolConstructor; \ No newline at end of file
diff --git a/cli/dts/lib.es2015.symbol.wellknown.d.ts b/cli/dts/lib.es2015.symbol.wellknown.d.ts
new file mode 100644
index 000000000..d3a54c2dc
--- /dev/null
+++ b/cli/dts/lib.es2015.symbol.wellknown.d.ts
@@ -0,0 +1,319 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2015.symbol" />
+
+interface SymbolConstructor {
+ /**
+ * A method that determines if a constructor object recognizes an object as one of the
+ * constructor’s instances. Called by the semantics of the instanceof operator.
+ */
+ readonly hasInstance: symbol;
+
+ /**
+ * A Boolean value that if true indicates that an object should flatten to its array elements
+ * by Array.prototype.concat.
+ */
+ readonly isConcatSpreadable: symbol;
+
+ /**
+ * A regular expression method that matches the regular expression against a string. Called
+ * by the String.prototype.match method.
+ */
+ readonly match: symbol;
+
+ /**
+ * A regular expression method that replaces matched substrings of a string. Called by the
+ * String.prototype.replace method.
+ */
+ readonly replace: symbol;
+
+ /**
+ * A regular expression method that returns the index within a string that matches the
+ * regular expression. Called by the String.prototype.search method.
+ */
+ readonly search: symbol;
+
+ /**
+ * A function valued property that is the constructor function that is used to create
+ * derived objects.
+ */
+ readonly species: symbol;
+
+ /**
+ * A regular expression method that splits a string at the indices that match the regular
+ * expression. Called by the String.prototype.split method.
+ */
+ readonly split: symbol;
+
+ /**
+ * A method that converts an object to a corresponding primitive value.
+ * Called by the ToPrimitive abstract operation.
+ */
+ readonly toPrimitive: symbol;
+
+ /**
+ * A String value that is used in the creation of the default string description of an object.
+ * Called by the built-in method Object.prototype.toString.
+ */
+ readonly toStringTag: symbol;
+
+ /**
+ * An Object whose own property names are property names that are excluded from the 'with'
+ * environment bindings of the associated objects.
+ */
+ readonly unscopables: symbol;
+}
+
+interface Symbol {
+ readonly [Symbol.toStringTag]: string;
+}
+
+interface Array<T> {
+ /**
+ * Returns an object whose properties have the value 'true'
+ * when they will be absent when used in a 'with' statement.
+ */
+ [Symbol.unscopables](): {
+ copyWithin: boolean;
+ entries: boolean;
+ fill: boolean;
+ find: boolean;
+ findIndex: boolean;
+ keys: boolean;
+ values: boolean;
+ };
+}
+
+interface Date {
+ /**
+ * Converts a Date object to a string.
+ */
+ [Symbol.toPrimitive](hint: "default"): string;
+ /**
+ * Converts a Date object to a string.
+ */
+ [Symbol.toPrimitive](hint: "string"): string;
+ /**
+ * Converts a Date object to a number.
+ */
+ [Symbol.toPrimitive](hint: "number"): number;
+ /**
+ * Converts a Date object to a string or number.
+ *
+ * @param hint The strings "number", "string", or "default" to specify what primitive to return.
+ *
+ * @throws {TypeError} If 'hint' was given something other than "number", "string", or "default".
+ * @returns A number if 'hint' was "number", a string if 'hint' was "string" or "default".
+ */
+ [Symbol.toPrimitive](hint: string): string | number;
+}
+
+interface Map<K, V> {
+ readonly [Symbol.toStringTag]: string;
+}
+
+interface WeakMap<K extends object, V> {
+ readonly [Symbol.toStringTag]: string;
+}
+
+interface Set<T> {
+ readonly [Symbol.toStringTag]: string;
+}
+
+interface WeakSet<T extends object> {
+ readonly [Symbol.toStringTag]: string;
+}
+
+interface JSON {
+ readonly [Symbol.toStringTag]: string;
+}
+
+interface Function {
+ /**
+ * Determines whether the given value inherits from this function if this function was used
+ * as a constructor function.
+ *
+ * A constructor function can control which objects are recognized as its instances by
+ * 'instanceof' by overriding this method.
+ */
+ [Symbol.hasInstance](value: any): boolean;
+}
+
+interface GeneratorFunction {
+ readonly [Symbol.toStringTag]: string;
+}
+
+interface Math {
+ readonly [Symbol.toStringTag]: string;
+}
+
+interface Promise<T> {
+ readonly [Symbol.toStringTag]: string;
+}
+
+interface PromiseConstructor {
+ readonly [Symbol.species]: PromiseConstructor;
+}
+
+interface RegExp {
+ /**
+ * Matches a string with this regular expression, and returns an array containing the results of
+ * that search.
+ * @param string A string to search within.
+ */
+ [Symbol.match](string: string): RegExpMatchArray | null;
+
+ /**
+ * Replaces text in a string, using this regular expression.
+ * @param string A String object or string literal whose contents matching against
+ * this regular expression will be replaced
+ * @param replaceValue A String object or string literal containing the text to replace for every
+ * successful match of this regular expression.
+ */
+ [Symbol.replace](string: string, replaceValue: string): string;
+
+ /**
+ * Replaces text in a string, using this regular expression.
+ * @param string A String object or string literal whose contents matching against
+ * this regular expression will be replaced
+ * @param replacer A function that returns the replacement text.
+ */
+ [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string;
+
+ /**
+ * Finds the position beginning first substring match in a regular expression search
+ * using this regular expression.
+ *
+ * @param string The string to search within.
+ */
+ [Symbol.search](string: string): number;
+
+ /**
+ * Returns an array of substrings that were delimited by strings in the original input that
+ * match against this regular expression.
+ *
+ * If the regular expression contains capturing parentheses, then each time this
+ * regular expression matches, the results (including any undefined results) of the
+ * capturing parentheses are spliced.
+ *
+ * @param string string value to split
+ * @param limit if not undefined, the output array is truncated so that it contains no more
+ * than 'limit' elements.
+ */
+ [Symbol.split](string: string, limit?: number): string[];
+}
+
+interface RegExpConstructor {
+ readonly [Symbol.species]: RegExpConstructor;
+}
+
+interface String {
+ /**
+ * Matches a string or an object that supports being matched against, and returns an array
+ * containing the results of that search, or null if no matches are found.
+ * @param matcher An object that supports being matched against.
+ */
+ match(matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null;
+
+ /**
+ * Replaces text in a string, using an object that supports replacement within a string.
+ * @param searchValue A object can search for and replace matches within a string.
+ * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
+ */
+ replace(searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string;
+
+ /**
+ * Replaces text in a string, using an object that supports replacement within a string.
+ * @param searchValue A object can search for and replace matches within a string.
+ * @param replacer A function that returns the replacement text.
+ */
+ replace(searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string;
+
+ /**
+ * Finds the first substring match in a regular expression search.
+ * @param searcher An object which supports searching within a string.
+ */
+ search(searcher: { [Symbol.search](string: string): number; }): number;
+
+ /**
+ * Split a string into substrings using the specified separator and return them as an array.
+ * @param splitter An object that can split a string.
+ * @param limit A value used to limit the number of elements returned in the array.
+ */
+ split(splitter: { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number): string[];
+}
+
+interface ArrayBuffer {
+ readonly [Symbol.toStringTag]: string;
+}
+
+interface DataView {
+ readonly [Symbol.toStringTag]: string;
+}
+
+interface Int8Array {
+ readonly [Symbol.toStringTag]: "Int8Array";
+}
+
+interface Uint8Array {
+ readonly [Symbol.toStringTag]: "Uint8Array";
+}
+
+interface Uint8ClampedArray {
+ readonly [Symbol.toStringTag]: "Uint8ClampedArray";
+}
+
+interface Int16Array {
+ readonly [Symbol.toStringTag]: "Int16Array";
+}
+
+interface Uint16Array {
+ readonly [Symbol.toStringTag]: "Uint16Array";
+}
+
+interface Int32Array {
+ readonly [Symbol.toStringTag]: "Int32Array";
+}
+
+interface Uint32Array {
+ readonly [Symbol.toStringTag]: "Uint32Array";
+}
+
+interface Float32Array {
+ readonly [Symbol.toStringTag]: "Float32Array";
+}
+
+interface Float64Array {
+ readonly [Symbol.toStringTag]: "Float64Array";
+}
+
+interface ArrayConstructor {
+ readonly [Symbol.species]: ArrayConstructor;
+}
+interface MapConstructor {
+ readonly [Symbol.species]: MapConstructor;
+}
+interface SetConstructor {
+ readonly [Symbol.species]: SetConstructor;
+}
+interface ArrayBufferConstructor {
+ readonly [Symbol.species]: ArrayBufferConstructor;
+}
diff --git a/cli/dts/lib.es2016.array.include.d.ts b/cli/dts/lib.es2016.array.include.d.ts
new file mode 100644
index 000000000..6bc6ef30e
--- /dev/null
+++ b/cli/dts/lib.es2016.array.include.d.ts
@@ -0,0 +1,118 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+interface Array<T> {
+ /**
+ * Determines whether an array includes a certain element, returning true or false as appropriate.
+ * @param searchElement The element to search for.
+ * @param fromIndex The position in this array at which to begin searching for searchElement.
+ */
+ includes(searchElement: T, fromIndex?: number): boolean;
+}
+
+interface ReadonlyArray<T> {
+ /**
+ * Determines whether an array includes a certain element, returning true or false as appropriate.
+ * @param searchElement The element to search for.
+ * @param fromIndex The position in this array at which to begin searching for searchElement.
+ */
+ includes(searchElement: T, fromIndex?: number): boolean;
+}
+
+interface Int8Array {
+ /**
+ * Determines whether an array includes a certain element, returning true or false as appropriate.
+ * @param searchElement The element to search for.
+ * @param fromIndex The position in this array at which to begin searching for searchElement.
+ */
+ includes(searchElement: number, fromIndex?: number): boolean;
+}
+
+interface Uint8Array {
+ /**
+ * Determines whether an array includes a certain element, returning true or false as appropriate.
+ * @param searchElement The element to search for.
+ * @param fromIndex The position in this array at which to begin searching for searchElement.
+ */
+ includes(searchElement: number, fromIndex?: number): boolean;
+}
+
+interface Uint8ClampedArray {
+ /**
+ * Determines whether an array includes a certain element, returning true or false as appropriate.
+ * @param searchElement The element to search for.
+ * @param fromIndex The position in this array at which to begin searching for searchElement.
+ */
+ includes(searchElement: number, fromIndex?: number): boolean;
+}
+
+interface Int16Array {
+ /**
+ * Determines whether an array includes a certain element, returning true or false as appropriate.
+ * @param searchElement The element to search for.
+ * @param fromIndex The position in this array at which to begin searching for searchElement.
+ */
+ includes(searchElement: number, fromIndex?: number): boolean;
+}
+
+interface Uint16Array {
+ /**
+ * Determines whether an array includes a certain element, returning true or false as appropriate.
+ * @param searchElement The element to search for.
+ * @param fromIndex The position in this array at which to begin searching for searchElement.
+ */
+ includes(searchElement: number, fromIndex?: number): boolean;
+}
+
+interface Int32Array {
+ /**
+ * Determines whether an array includes a certain element, returning true or false as appropriate.
+ * @param searchElement The element to search for.
+ * @param fromIndex The position in this array at which to begin searching for searchElement.
+ */
+ includes(searchElement: number, fromIndex?: number): boolean;
+}
+
+interface Uint32Array {
+ /**
+ * Determines whether an array includes a certain element, returning true or false as appropriate.
+ * @param searchElement The element to search for.
+ * @param fromIndex The position in this array at which to begin searching for searchElement.
+ */
+ includes(searchElement: number, fromIndex?: number): boolean;
+}
+
+interface Float32Array {
+ /**
+ * Determines whether an array includes a certain element, returning true or false as appropriate.
+ * @param searchElement The element to search for.
+ * @param fromIndex The position in this array at which to begin searching for searchElement.
+ */
+ includes(searchElement: number, fromIndex?: number): boolean;
+}
+
+interface Float64Array {
+ /**
+ * Determines whether an array includes a certain element, returning true or false as appropriate.
+ * @param searchElement The element to search for.
+ * @param fromIndex The position in this array at which to begin searching for searchElement.
+ */
+ includes(searchElement: number, fromIndex?: number): boolean;
+} \ No newline at end of file
diff --git a/cli/dts/lib.es2016.d.ts b/cli/dts/lib.es2016.d.ts
new file mode 100644
index 000000000..ade8175f5
--- /dev/null
+++ b/cli/dts/lib.es2016.d.ts
@@ -0,0 +1,22 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2015" />
+/// <reference lib="es2016.array.include" /> \ No newline at end of file
diff --git a/cli/dts/lib.es2016.full.d.ts b/cli/dts/lib.es2016.full.d.ts
new file mode 100644
index 000000000..ad61d2325
--- /dev/null
+++ b/cli/dts/lib.es2016.full.d.ts
@@ -0,0 +1,25 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2016" />
+/// <reference lib="dom" />
+/// <reference lib="webworker.importscripts" />
+/// <reference lib="scripthost" />
+/// <reference lib="dom.iterable" /> \ No newline at end of file
diff --git a/cli/dts/lib.es2017.d.ts b/cli/dts/lib.es2017.d.ts
new file mode 100644
index 000000000..d89f58071
--- /dev/null
+++ b/cli/dts/lib.es2017.d.ts
@@ -0,0 +1,26 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2016" />
+/// <reference lib="es2017.object" />
+/// <reference lib="es2017.sharedmemory" />
+/// <reference lib="es2017.string" />
+/// <reference lib="es2017.intl" />
+/// <reference lib="es2017.typedarrays" />
diff --git a/cli/dts/lib.es2017.full.d.ts b/cli/dts/lib.es2017.full.d.ts
new file mode 100644
index 000000000..f57c645c5
--- /dev/null
+++ b/cli/dts/lib.es2017.full.d.ts
@@ -0,0 +1,25 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2017" />
+/// <reference lib="dom" />
+/// <reference lib="webworker.importscripts" />
+/// <reference lib="scripthost" />
+/// <reference lib="dom.iterable" /> \ No newline at end of file
diff --git a/cli/dts/lib.es2017.intl.d.ts b/cli/dts/lib.es2017.intl.d.ts
new file mode 100644
index 000000000..f20c149f2
--- /dev/null
+++ b/cli/dts/lib.es2017.intl.d.ts
@@ -0,0 +1,32 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+declare namespace Intl {
+ type DateTimeFormatPartTypes = "day" | "dayPeriod" | "era" | "hour" | "literal" | "minute" | "month" | "second" | "timeZoneName" | "weekday" | "year";
+
+ interface DateTimeFormatPart {
+ type: DateTimeFormatPartTypes;
+ value: string;
+ }
+
+ interface DateTimeFormat {
+ formatToParts(date?: Date | number): DateTimeFormatPart[];
+ }
+}
diff --git a/cli/dts/lib.es2017.object.d.ts b/cli/dts/lib.es2017.object.d.ts
new file mode 100644
index 000000000..4900d9261
--- /dev/null
+++ b/cli/dts/lib.es2017.object.d.ts
@@ -0,0 +1,51 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+interface ObjectConstructor {
+ /**
+ * Returns an array of values of the enumerable properties of an object
+ * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
+ */
+ values<T>(o: { [s: string]: T } | ArrayLike<T>): T[];
+
+ /**
+ * Returns an array of values of the enumerable properties of an object
+ * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
+ */
+ values(o: {}): any[];
+
+ /**
+ * Returns an array of key/values of the enumerable properties of an object
+ * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
+ */
+ entries<T>(o: { [s: string]: T } | ArrayLike<T>): [string, T][];
+
+ /**
+ * Returns an array of key/values of the enumerable properties of an object
+ * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
+ */
+ entries(o: {}): [string, any][];
+
+ /**
+ * Returns an object containing all own property descriptors of an object
+ * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
+ */
+ getOwnPropertyDescriptors<T>(o: T): {[P in keyof T]: TypedPropertyDescriptor<T[P]>} & { [x: string]: PropertyDescriptor };
+}
diff --git a/cli/dts/lib.es2017.sharedmemory.d.ts b/cli/dts/lib.es2017.sharedmemory.d.ts
new file mode 100644
index 000000000..f9adca032
--- /dev/null
+++ b/cli/dts/lib.es2017.sharedmemory.d.ts
@@ -0,0 +1,138 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2015.symbol" />
+/// <reference lib="es2015.symbol.wellknown" />
+
+interface SharedArrayBuffer {
+ /**
+ * Read-only. The length of the ArrayBuffer (in bytes).
+ */
+ readonly byteLength: number;
+
+ /*
+ * The SharedArrayBuffer constructor's length property whose value is 1.
+ */
+ length: number;
+ /**
+ * Returns a section of an SharedArrayBuffer.
+ */
+ slice(begin: number, end?: number): SharedArrayBuffer;
+ readonly [Symbol.species]: SharedArrayBuffer;
+ readonly [Symbol.toStringTag]: "SharedArrayBuffer";
+}
+
+interface SharedArrayBufferConstructor {
+ readonly prototype: SharedArrayBuffer;
+ new (byteLength: number): SharedArrayBuffer;
+}
+declare var SharedArrayBuffer: SharedArrayBufferConstructor;
+
+interface ArrayBufferTypes {
+ SharedArrayBuffer: SharedArrayBuffer;
+}
+
+interface Atomics {
+ /**
+ * Adds a value to the value at the given position in the array, returning the original value.
+ * Until this atomic operation completes, any other read or write operation against the array
+ * will block.
+ */
+ add(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number;
+
+ /**
+ * Stores the bitwise AND of a value with the value at the given position in the array,
+ * returning the original value. Until this atomic operation completes, any other read or
+ * write operation against the array will block.
+ */
+ and(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number;
+
+ /**
+ * Replaces the value at the given position in the array if the original value equals the given
+ * expected value, returning the original value. Until this atomic operation completes, any
+ * other read or write operation against the array will block.
+ */
+ compareExchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, expectedValue: number, replacementValue: number): number;
+
+ /**
+ * Replaces the value at the given position in the array, returning the original value. Until
+ * this atomic operation completes, any other read or write operation against the array will
+ * block.
+ */
+ exchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number;
+
+ /**
+ * Returns a value indicating whether high-performance algorithms can use atomic operations
+ * (`true`) or must use locks (`false`) for the given number of bytes-per-element of a typed
+ * array.
+ */
+ isLockFree(size: number): boolean;
+
+ /**
+ * Returns the value at the given position in the array. Until this atomic operation completes,
+ * any other read or write operation against the array will block.
+ */
+ load(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number): number;
+
+ /**
+ * Stores the bitwise OR of a value with the value at the given position in the array,
+ * returning the original value. Until this atomic operation completes, any other read or write
+ * operation against the array will block.
+ */
+ or(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number;
+
+ /**
+ * Stores a value at the given position in the array, returning the new value. Until this
+ * atomic operation completes, any other read or write operation against the array will block.
+ */
+ store(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number;
+
+ /**
+ * Subtracts a value from the value at the given position in the array, returning the original
+ * value. Until this atomic operation completes, any other read or write operation against the
+ * array will block.
+ */
+ sub(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number;
+
+ /**
+ * If the value at the given position in the array is equal to the provided value, the current
+ * agent is put to sleep causing execution to suspend until the timeout expires (returning
+ * `"timed-out"`) or until the agent is awoken (returning `"ok"`); otherwise, returns
+ * `"not-equal"`.
+ */
+ wait(typedArray: Int32Array, index: number, value: number, timeout?: number): "ok" | "not-equal" | "timed-out";
+
+ /**
+ * Wakes up sleeping agents that are waiting on the given index of the array, returning the
+ * number of agents that were awoken.
+ */
+ notify(typedArray: Int32Array, index: number, count: number): number;
+
+ /**
+ * Stores the bitwise XOR of a value with the value at the given position in the array,
+ * returning the original value. Until this atomic operation completes, any other read or write
+ * operation against the array will block.
+ */
+ xor(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number;
+
+ readonly [Symbol.toStringTag]: "Atomics";
+}
+
+declare var Atomics: Atomics;
diff --git a/cli/dts/lib.es2017.string.d.ts b/cli/dts/lib.es2017.string.d.ts
new file mode 100644
index 000000000..4b219e6c5
--- /dev/null
+++ b/cli/dts/lib.es2017.string.d.ts
@@ -0,0 +1,47 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+interface String {
+ /**
+ * Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length.
+ * The padding is applied from the start (left) of the current string.
+ *
+ * @param maxLength The length of the resulting string once the current string has been padded.
+ * If this parameter is smaller than the current string's length, the current string will be returned as it is.
+ *
+ * @param fillString The string to pad the current string with.
+ * If this string is too long, it will be truncated and the left-most part will be applied.
+ * The default value for this parameter is " " (U+0020).
+ */
+ padStart(maxLength: number, fillString?: string): string;
+
+ /**
+ * Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length.
+ * The padding is applied from the end (right) of the current string.
+ *
+ * @param maxLength The length of the resulting string once the current string has been padded.
+ * If this parameter is smaller than the current string's length, the current string will be returned as it is.
+ *
+ * @param fillString The string to pad the current string with.
+ * If this string is too long, it will be truncated and the left-most part will be applied.
+ * The default value for this parameter is " " (U+0020).
+ */
+ padEnd(maxLength: number, fillString?: string): string;
+}
diff --git a/cli/dts/lib.es2017.typedarrays.d.ts b/cli/dts/lib.es2017.typedarrays.d.ts
new file mode 100644
index 000000000..ac6984100
--- /dev/null
+++ b/cli/dts/lib.es2017.typedarrays.d.ts
@@ -0,0 +1,55 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+interface Int8ArrayConstructor {
+ new (): Int8Array;
+}
+
+interface Uint8ArrayConstructor {
+ new (): Uint8Array;
+}
+
+interface Uint8ClampedArrayConstructor {
+ new (): Uint8ClampedArray;
+}
+
+interface Int16ArrayConstructor {
+ new (): Int16Array;
+}
+
+interface Uint16ArrayConstructor {
+ new (): Uint16Array;
+}
+
+interface Int32ArrayConstructor {
+ new (): Int32Array;
+}
+
+interface Uint32ArrayConstructor {
+ new (): Uint32Array;
+}
+
+interface Float32ArrayConstructor {
+ new (): Float32Array;
+}
+
+interface Float64ArrayConstructor {
+ new (): Float64Array;
+}
diff --git a/cli/dts/lib.es2018.asyncgenerator.d.ts b/cli/dts/lib.es2018.asyncgenerator.d.ts
new file mode 100644
index 000000000..546a8c2e9
--- /dev/null
+++ b/cli/dts/lib.es2018.asyncgenerator.d.ts
@@ -0,0 +1,79 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2018.asynciterable" />
+
+interface AsyncGenerator<T = unknown, TReturn = any, TNext = unknown> extends AsyncIterator<T, TReturn, TNext> {
+ // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.
+ next(...args: [] | [TNext]): Promise<IteratorResult<T, TReturn>>;
+ return(value: TReturn | PromiseLike<TReturn>): Promise<IteratorResult<T, TReturn>>;
+ throw(e: any): Promise<IteratorResult<T, TReturn>>;
+ [Symbol.asyncIterator](): AsyncGenerator<T, TReturn, TNext>;
+}
+
+interface AsyncGeneratorFunction {
+ /**
+ * Creates a new AsyncGenerator object.
+ * @param args A list of arguments the function accepts.
+ */
+ new (...args: any[]): AsyncGenerator;
+ /**
+ * Creates a new AsyncGenerator object.
+ * @param args A list of arguments the function accepts.
+ */
+ (...args: any[]): AsyncGenerator;
+ /**
+ * The length of the arguments.
+ */
+ readonly length: number;
+ /**
+ * Returns the name of the function.
+ */
+ readonly name: string;
+ /**
+ * A reference to the prototype.
+ */
+ readonly prototype: AsyncGenerator;
+}
+
+interface AsyncGeneratorFunctionConstructor {
+ /**
+ * Creates a new AsyncGenerator function.
+ * @param args A list of arguments the function accepts.
+ */
+ new (...args: string[]): AsyncGeneratorFunction;
+ /**
+ * Creates a new AsyncGenerator function.
+ * @param args A list of arguments the function accepts.
+ */
+ (...args: string[]): AsyncGeneratorFunction;
+ /**
+ * The length of the arguments.
+ */
+ readonly length: number;
+ /**
+ * Returns the name of the function.
+ */
+ readonly name: string;
+ /**
+ * A reference to the prototype.
+ */
+ readonly prototype: AsyncGeneratorFunction;
+}
diff --git a/cli/dts/lib.es2018.asynciterable.d.ts b/cli/dts/lib.es2018.asynciterable.d.ts
new file mode 100644
index 000000000..2c3a97085
--- /dev/null
+++ b/cli/dts/lib.es2018.asynciterable.d.ts
@@ -0,0 +1,45 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2015.symbol" />
+/// <reference lib="es2015.iterable" />
+
+interface SymbolConstructor {
+ /**
+ * A method that returns the default async iterator for an object. Called by the semantics of
+ * the for-await-of statement.
+ */
+ readonly asyncIterator: symbol;
+}
+
+interface AsyncIterator<T, TReturn = any, TNext = undefined> {
+ // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.
+ next(...args: [] | [TNext]): Promise<IteratorResult<T, TReturn>>;
+ return?(value?: TReturn | PromiseLike<TReturn>): Promise<IteratorResult<T, TReturn>>;
+ throw?(e?: any): Promise<IteratorResult<T, TReturn>>;
+}
+
+interface AsyncIterable<T> {
+ [Symbol.asyncIterator](): AsyncIterator<T>;
+}
+
+interface AsyncIterableIterator<T> extends AsyncIterator<T> {
+ [Symbol.asyncIterator](): AsyncIterableIterator<T>;
+} \ No newline at end of file
diff --git a/cli/dts/lib.es2018.d.ts b/cli/dts/lib.es2018.d.ts
new file mode 100644
index 000000000..db0a3d1b0
--- /dev/null
+++ b/cli/dts/lib.es2018.d.ts
@@ -0,0 +1,26 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2017" />
+/// <reference lib="es2018.asynciterable" />
+/// <reference lib="es2018.asyncgenerator" />
+/// <reference lib="es2018.promise" />
+/// <reference lib="es2018.regexp" />
+/// <reference lib="es2018.intl" />
diff --git a/cli/dts/lib.es2018.full.d.ts b/cli/dts/lib.es2018.full.d.ts
new file mode 100644
index 000000000..b517dc590
--- /dev/null
+++ b/cli/dts/lib.es2018.full.d.ts
@@ -0,0 +1,25 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2018" />
+/// <reference lib="dom" />
+/// <reference lib="webworker.importscripts" />
+/// <reference lib="scripthost" />
+/// <reference lib="dom.iterable" /> \ No newline at end of file
diff --git a/cli/dts/lib.es2018.intl.d.ts b/cli/dts/lib.es2018.intl.d.ts
new file mode 100644
index 000000000..0d7961101
--- /dev/null
+++ b/cli/dts/lib.es2018.intl.d.ts
@@ -0,0 +1,61 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+declare namespace Intl {
+
+ // http://cldr.unicode.org/index/cldr-spec/plural-rules#TOC-Determining-Plural-Categories
+ type LDMLPluralRule = "zero" | "one" | "two" | "few" | "many" | "other";
+ type PluralRuleType = "cardinal" | "ordinal";
+
+ interface PluralRulesOptions {
+ localeMatcher?: "lookup" | "best fit";
+ type?: PluralRuleType;
+ minimumIntegerDigits?: number;
+ minimumFractionDigits?: number;
+ maximumFractionDigits?: number;
+ minimumSignificantDigits?: number;
+ maximumSignificantDigits?: number;
+ }
+
+ interface ResolvedPluralRulesOptions {
+ locale: string;
+ pluralCategories: LDMLPluralRule[];
+ type: PluralRuleType;
+ minimumIntegerDigits: number;
+ minimumFractionDigits: number;
+ maximumFractionDigits: number;
+ minimumSignificantDigits?: number;
+ maximumSignificantDigits?: number;
+ }
+
+ interface PluralRules {
+ resolvedOptions(): ResolvedPluralRulesOptions;
+ select(n: number): LDMLPluralRule;
+ }
+
+ const PluralRules: {
+ new (locales?: string | string[], options?: PluralRulesOptions): PluralRules;
+ (locales?: string | string[], options?: PluralRulesOptions): PluralRules;
+ supportedLocalesOf(
+ locales: string | string[],
+ options?: PluralRulesOptions,
+ ): string[];
+ };
+}
diff --git a/cli/dts/lib.es2018.promise.d.ts b/cli/dts/lib.es2018.promise.d.ts
new file mode 100644
index 000000000..1a95d7c87
--- /dev/null
+++ b/cli/dts/lib.es2018.promise.d.ts
@@ -0,0 +1,32 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/**
+ * Represents the completion of an asynchronous operation
+ */
+interface Promise<T> {
+ /**
+ * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The
+ * resolved value cannot be modified from the callback.
+ * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected).
+ * @returns A Promise for the completion of the callback.
+ */
+ finally(onfinally?: (() => void) | undefined | null): Promise<T>
+}
diff --git a/cli/dts/lib.es2018.regexp.d.ts b/cli/dts/lib.es2018.regexp.d.ts
new file mode 100644
index 000000000..9cb3710b5
--- /dev/null
+++ b/cli/dts/lib.es2018.regexp.d.ts
@@ -0,0 +1,39 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+interface RegExpMatchArray {
+ groups?: {
+ [key: string]: string
+ }
+}
+
+interface RegExpExecArray {
+ groups?: {
+ [key: string]: string
+ }
+}
+
+interface RegExp {
+ /**
+ * Returns a Boolean value indicating the state of the dotAll flag (s) used with a regular expression.
+ * Default is false. Read-only.
+ */
+ readonly dotAll: boolean;
+} \ No newline at end of file
diff --git a/cli/dts/lib.es2019.array.d.ts b/cli/dts/lib.es2019.array.d.ts
new file mode 100644
index 000000000..160748346
--- /dev/null
+++ b/cli/dts/lib.es2019.array.d.ts
@@ -0,0 +1,85 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+type FlatArray<Arr, Depth extends number> = {
+ "done": Arr,
+ "recur": Arr extends ReadonlyArray<infer InnerArr>
+ ? FlatArray<InnerArr, [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][Depth]>
+ : Arr
+}[Depth extends -1 ? "done" : "recur"];
+
+interface ReadonlyArray<T> {
+
+ /**
+ * Calls a defined callback function on each element of an array. Then, flattens the result into
+ * a new array.
+ * This is identical to a map followed by flat with depth 1.
+ *
+ * @param callback A function that accepts up to three arguments. The flatMap method calls the
+ * callback function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callback function. If
+ * thisArg is omitted, undefined is used as the this value.
+ */
+ flatMap<U, This = undefined> (
+ callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray<U>,
+ thisArg?: This
+ ): U[]
+
+
+ /**
+ * Returns a new array with all sub-array elements concatenated into it recursively up to the
+ * specified depth.
+ *
+ * @param depth The maximum recursion depth
+ */
+ flat<A, D extends number = 1>(
+ this: A,
+ depth?: D
+ ): FlatArray<A, D>[]
+ }
+
+interface Array<T> {
+
+ /**
+ * Calls a defined callback function on each element of an array. Then, flattens the result into
+ * a new array.
+ * This is identical to a map followed by flat with depth 1.
+ *
+ * @param callback A function that accepts up to three arguments. The flatMap method calls the
+ * callback function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callback function. If
+ * thisArg is omitted, undefined is used as the this value.
+ */
+ flatMap<U, This = undefined> (
+ callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray<U>,
+ thisArg?: This
+ ): U[]
+
+ /**
+ * Returns a new array with all sub-array elements concatenated into it recursively up to the
+ * specified depth.
+ *
+ * @param depth The maximum recursion depth
+ */
+ flat<A, D extends number = 1>(
+ this: A,
+ depth?: D
+ ): FlatArray<A, D>[]
+}
diff --git a/cli/dts/lib.es2019.d.ts b/cli/dts/lib.es2019.d.ts
new file mode 100644
index 000000000..5eab0e2c2
--- /dev/null
+++ b/cli/dts/lib.es2019.d.ts
@@ -0,0 +1,25 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2018" />
+/// <reference lib="es2019.array" />
+/// <reference lib="es2019.object" />
+/// <reference lib="es2019.string" />
+/// <reference lib="es2019.symbol" />
diff --git a/cli/dts/lib.es2019.full.d.ts b/cli/dts/lib.es2019.full.d.ts
new file mode 100644
index 000000000..1ebdb1fe0
--- /dev/null
+++ b/cli/dts/lib.es2019.full.d.ts
@@ -0,0 +1,25 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2019" />
+/// <reference lib="dom" />
+/// <reference lib="webworker.importscripts" />
+/// <reference lib="scripthost" />
+/// <reference lib="dom.iterable" />
diff --git a/cli/dts/lib.es2019.object.d.ts b/cli/dts/lib.es2019.object.d.ts
new file mode 100644
index 000000000..09b937af0
--- /dev/null
+++ b/cli/dts/lib.es2019.object.d.ts
@@ -0,0 +1,35 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2015.iterable" />
+
+interface ObjectConstructor {
+ /**
+ * Returns an object created by key-value entries for properties and methods
+ * @param entries An iterable object that contains key-value entries for properties and methods.
+ */
+ fromEntries<T = any>(entries: Iterable<readonly [PropertyKey, T]>): { [k: string]: T };
+
+ /**
+ * Returns an object created by key-value entries for properties and methods
+ * @param entries An iterable object that contains key-value entries for properties and methods.
+ */
+ fromEntries(entries: Iterable<readonly any[]>): any;
+}
diff --git a/cli/dts/lib.es2019.string.d.ts b/cli/dts/lib.es2019.string.d.ts
new file mode 100644
index 000000000..5322f2320
--- /dev/null
+++ b/cli/dts/lib.es2019.string.d.ts
@@ -0,0 +1,33 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+interface String {
+ /** Removes the trailing white space and line terminator characters from a string. */
+ trimEnd(): string;
+
+ /** Removes the leading white space and line terminator characters from a string. */
+ trimStart(): string;
+
+ /** Removes the leading white space and line terminator characters from a string. */
+ trimLeft(): string;
+
+ /** Removes the trailing white space and line terminator characters from a string. */
+ trimRight(): string;
+}
diff --git a/cli/dts/lib.es2019.symbol.d.ts b/cli/dts/lib.es2019.symbol.d.ts
new file mode 100644
index 000000000..58b38d5f9
--- /dev/null
+++ b/cli/dts/lib.es2019.symbol.d.ts
@@ -0,0 +1,26 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+interface Symbol {
+ /**
+ * Expose the [[Description]] internal slot of a symbol directly.
+ */
+ readonly description: string | undefined;
+}
diff --git a/cli/dts/lib.es2020.bigint.d.ts b/cli/dts/lib.es2020.bigint.d.ts
new file mode 100644
index 000000000..ad59be008
--- /dev/null
+++ b/cli/dts/lib.es2020.bigint.d.ts
@@ -0,0 +1,635 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+interface BigInt {
+ /**
+ * Returns a string representation of an object.
+ * @param radix Specifies a radix for converting numeric values to strings.
+ */
+ toString(radix?: number): string;
+
+ /** Returns a string representation appropriate to the host environment's current locale. */
+ toLocaleString(): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): bigint;
+
+ readonly [Symbol.toStringTag]: "BigInt";
+}
+
+interface BigIntConstructor {
+ (value?: any): bigint;
+ readonly prototype: BigInt;
+
+ /**
+ * Interprets the low bits of a BigInt as a 2's-complement signed integer.
+ * All higher bits are discarded.
+ * @param bits The number of low bits to use
+ * @param int The BigInt whose bits to extract
+ */
+ asIntN(bits: number, int: bigint): bigint;
+ /**
+ * Interprets the low bits of a BigInt as an unsigned integer.
+ * All higher bits are discarded.
+ * @param bits The number of low bits to use
+ * @param int The BigInt whose bits to extract
+ */
+ asUintN(bits: number, int: bigint): bigint;
+}
+
+declare var BigInt: BigIntConstructor;
+
+/**
+ * A typed array of 64-bit signed integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated, an exception is raised.
+ */
+interface BigInt64Array {
+ /** The size in bytes of each element in the array. */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /** The ArrayBuffer instance referenced by the array. */
+ readonly buffer: ArrayBufferLike;
+
+ /** The length in bytes of the array. */
+ readonly byteLength: number;
+
+ /** The offset in bytes of the array. */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /** Yields index, value pairs for every entry in the array. */
+ entries(): IterableIterator<[number, bigint]>;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in the array until the callbackfn returns false,
+ * or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: bigint, start?: number, end?: number): this;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (value: bigint, index: number, array: BigInt64Array) => any, thisArg?: any): BigInt64Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): bigint | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (value: bigint, index: number, array: BigInt64Array) => void, thisArg?: any): void;
+
+ /**
+ * Determines whether an array includes a certain element, returning true or false as appropriate.
+ * @param searchElement The element to search for.
+ * @param fromIndex The position in this array at which to begin searching for searchElement.
+ */
+ includes(searchElement: bigint, fromIndex?: number): boolean;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: bigint, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /** Yields each index in the array. */
+ keys(): IterableIterator<number>;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: bigint, fromIndex?: number): number;
+
+ /** The length of the array. */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (value: bigint, index: number, array: BigInt64Array) => bigint, thisArg?: any): BigInt64Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint): bigint;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint): bigint;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array) => U, initialValue: U): U;
+
+ /** Reverses the elements in the array. */
+ reverse(): this;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<bigint>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): BigInt64Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in the array until the callbackfn returns true, or until
+ * the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): boolean;
+
+ /**
+ * Sorts the array.
+ * @param compareFn The function used to determine the order of the elements. If omitted, the elements are sorted in ascending order.
+ */
+ sort(compareFn?: (a: bigint, b: bigint) => number | bigint): this;
+
+ /**
+ * Gets a new BigInt64Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin?: number, end?: number): BigInt64Array;
+
+ /** Converts the array to a string by using the current locale. */
+ toLocaleString(): string;
+
+ /** Returns a string representation of the array. */
+ toString(): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): BigInt64Array;
+
+ /** Yields each value in the array. */
+ values(): IterableIterator<bigint>;
+
+ [Symbol.iterator](): IterableIterator<bigint>;
+
+ readonly [Symbol.toStringTag]: "BigInt64Array";
+
+ [index: number]: bigint;
+}
+
+interface BigInt64ArrayConstructor {
+ readonly prototype: BigInt64Array;
+ new(length?: number): BigInt64Array;
+ new(array: Iterable<bigint>): BigInt64Array;
+ new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigInt64Array;
+
+ /** The size in bytes of each element in the array. */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: bigint[]): BigInt64Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: ArrayLike<bigint>): BigInt64Array;
+ from<U>(arrayLike: ArrayLike<U>, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigInt64Array;
+}
+
+declare var BigInt64Array: BigInt64ArrayConstructor;
+
+/**
+ * A typed array of 64-bit unsigned integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated, an exception is raised.
+ */
+interface BigUint64Array {
+ /** The size in bytes of each element in the array. */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /** The ArrayBuffer instance referenced by the array. */
+ readonly buffer: ArrayBufferLike;
+
+ /** The length in bytes of the array. */
+ readonly byteLength: number;
+
+ /** The offset in bytes of the array. */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /** Yields index, value pairs for every entry in the array. */
+ entries(): IterableIterator<[number, bigint]>;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in the array until the callbackfn returns false,
+ * or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: bigint, start?: number, end?: number): this;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (value: bigint, index: number, array: BigUint64Array) => any, thisArg?: any): BigUint64Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): bigint | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (value: bigint, index: number, array: BigUint64Array) => void, thisArg?: any): void;
+
+ /**
+ * Determines whether an array includes a certain element, returning true or false as appropriate.
+ * @param searchElement The element to search for.
+ * @param fromIndex The position in this array at which to begin searching for searchElement.
+ */
+ includes(searchElement: bigint, fromIndex?: number): boolean;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: bigint, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /** Yields each index in the array. */
+ keys(): IterableIterator<number>;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: bigint, fromIndex?: number): number;
+
+ /** The length of the array. */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (value: bigint, index: number, array: BigUint64Array) => bigint, thisArg?: any): BigUint64Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint): bigint;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigUint64Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint): bigint;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigUint64Array) => U, initialValue: U): U;
+
+ /** Reverses the elements in the array. */
+ reverse(): this;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<bigint>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): BigUint64Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in the array until the callbackfn returns true, or until
+ * the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): boolean;
+
+ /**
+ * Sorts the array.
+ * @param compareFn The function used to determine the order of the elements. If omitted, the elements are sorted in ascending order.
+ */
+ sort(compareFn?: (a: bigint, b: bigint) => number | bigint): this;
+
+ /**
+ * Gets a new BigUint64Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin?: number, end?: number): BigUint64Array;
+
+ /** Converts the array to a string by using the current locale. */
+ toLocaleString(): string;
+
+ /** Returns a string representation of the array. */
+ toString(): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): BigUint64Array;
+
+ /** Yields each value in the array. */
+ values(): IterableIterator<bigint>;
+
+ [Symbol.iterator](): IterableIterator<bigint>;
+
+ readonly [Symbol.toStringTag]: "BigUint64Array";
+
+ [index: number]: bigint;
+}
+
+interface BigUint64ArrayConstructor {
+ readonly prototype: BigUint64Array;
+ new(length?: number): BigUint64Array;
+ new(array: Iterable<bigint>): BigUint64Array;
+ new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigUint64Array;
+
+ /** The size in bytes of each element in the array. */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: bigint[]): BigUint64Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: ArrayLike<bigint>): BigUint64Array;
+ from<U>(arrayLike: ArrayLike<U>, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigUint64Array;
+}
+
+declare var BigUint64Array: BigUint64ArrayConstructor;
+
+interface DataView {
+ /**
+ * Gets the BigInt64 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getBigInt64(byteOffset: number, littleEndian?: boolean): bigint;
+
+ /**
+ * Gets the BigUint64 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getBigUint64(byteOffset: number, littleEndian?: boolean): bigint;
+
+ /**
+ * Stores a BigInt64 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ * @param littleEndian If false or undefined, a big-endian value should be written,
+ * otherwise a little-endian value should be written.
+ */
+ setBigInt64(byteOffset: number, value: bigint, littleEndian?: boolean): void;
+
+ /**
+ * Stores a BigUint64 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ * @param littleEndian If false or undefined, a big-endian value should be written,
+ * otherwise a little-endian value should be written.
+ */
+ setBigUint64(byteOffset: number, value: bigint, littleEndian?: boolean): void;
+}
diff --git a/cli/dts/lib.es2020.d.ts b/cli/dts/lib.es2020.d.ts
new file mode 100644
index 000000000..c72f14812
--- /dev/null
+++ b/cli/dts/lib.es2020.d.ts
@@ -0,0 +1,25 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2019" />
+/// <reference lib="es2020.bigint" />
+/// <reference lib="es2020.promise" />
+/// <reference lib="es2020.string" />
+/// <reference lib="es2020.symbol.wellknown" />
diff --git a/cli/dts/lib.es2020.full.d.ts b/cli/dts/lib.es2020.full.d.ts
new file mode 100644
index 000000000..165b566d2
--- /dev/null
+++ b/cli/dts/lib.es2020.full.d.ts
@@ -0,0 +1,25 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2020" />
+/// <reference lib="dom" />
+/// <reference lib="webworker.importscripts" />
+/// <reference lib="scripthost" />
+/// <reference lib="dom.iterable" />
diff --git a/cli/dts/lib.es2020.promise.d.ts b/cli/dts/lib.es2020.promise.d.ts
new file mode 100644
index 000000000..a3b2c0aa8
--- /dev/null
+++ b/cli/dts/lib.es2020.promise.d.ts
@@ -0,0 +1,50 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+interface PromiseFulfilledResult<T> {
+ status: "fulfilled";
+ value: T;
+}
+
+interface PromiseRejectedResult {
+ status: "rejected";
+ reason: any;
+}
+
+type PromiseSettledResult<T> = PromiseFulfilledResult<T> | PromiseRejectedResult;
+
+interface PromiseConstructor {
+ /**
+ * Creates a Promise that is resolved with an array of results when all
+ * of the provided Promises resolve or reject.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ allSettled<T extends readonly unknown[] | readonly [unknown]>(values: T):
+ Promise<{ -readonly [P in keyof T]: PromiseSettledResult<T[P] extends PromiseLike<infer U> ? U : T[P]> }>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all
+ * of the provided Promises resolve or reject.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ allSettled<T>(values: Iterable<T>): Promise<PromiseSettledResult<T extends PromiseLike<infer U> ? U : T>[]>;
+}
diff --git a/cli/dts/lib.es2020.string.d.ts b/cli/dts/lib.es2020.string.d.ts
new file mode 100644
index 000000000..19c730752
--- /dev/null
+++ b/cli/dts/lib.es2020.string.d.ts
@@ -0,0 +1,30 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2015.iterable" />
+
+interface String {
+ /**
+ * Matches a string with a regular expression, and returns an iterable of matches
+ * containing the results of that search.
+ * @param regexp A variable name or string literal containing the regular expression pattern and flags.
+ */
+ matchAll(regexp: RegExp): IterableIterator<RegExpMatchArray>;
+}
diff --git a/cli/dts/lib.es2020.symbol.wellknown.d.ts b/cli/dts/lib.es2020.symbol.wellknown.d.ts
new file mode 100644
index 000000000..4bac52fec
--- /dev/null
+++ b/cli/dts/lib.es2020.symbol.wellknown.d.ts
@@ -0,0 +1,39 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2015.iterable" />
+/// <reference lib="es2015.symbol" />
+
+interface SymbolConstructor {
+ /**
+ * A regular expression method that matches the regular expression against a string. Called
+ * by the String.prototype.matchAll method.
+ */
+ readonly matchAll: symbol;
+}
+
+interface RegExp {
+ /**
+ * Matches a string with this regular expression, and returns an iterable of matches
+ * containing the results of that search.
+ * @param string A string to search within.
+ */
+ [Symbol.matchAll](str: string): IterableIterator<RegExpMatchArray>;
+}
diff --git a/cli/dts/lib.es5.d.ts b/cli/dts/lib.es5.d.ts
new file mode 100644
index 000000000..ec5e1a572
--- /dev/null
+++ b/cli/dts/lib.es5.d.ts
@@ -0,0 +1,4383 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/////////////////////////////
+/// ECMAScript APIs
+/////////////////////////////
+
+declare var NaN: number;
+declare var Infinity: number;
+
+/**
+ * Evaluates JavaScript code and executes it.
+ * @param x A String value that contains valid JavaScript code.
+ */
+declare function eval(x: string): any;
+
+/**
+ * Converts a string to an integer.
+ * @param s A string to convert into a number.
+ * @param radix A value between 2 and 36 that specifies the base of the number in numString.
+ * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.
+ * All other strings are considered decimal.
+ */
+declare function parseInt(s: string, radix?: number): number;
+
+/**
+ * Converts a string to a floating-point number.
+ * @param string A string that contains a floating-point number.
+ */
+declare function parseFloat(string: string): number;
+
+/**
+ * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a number).
+ * @param number A numeric value.
+ */
+declare function isNaN(number: number): boolean;
+
+/**
+ * Determines whether a supplied number is finite.
+ * @param number Any numeric value.
+ */
+declare function isFinite(number: number): boolean;
+
+/**
+ * Gets the unencoded version of an encoded Uniform Resource Identifier (URI).
+ * @param encodedURI A value representing an encoded URI.
+ */
+declare function decodeURI(encodedURI: string): string;
+
+/**
+ * Gets the unencoded version of an encoded component of a Uniform Resource Identifier (URI).
+ * @param encodedURIComponent A value representing an encoded URI component.
+ */
+declare function decodeURIComponent(encodedURIComponent: string): string;
+
+/**
+ * Encodes a text string as a valid Uniform Resource Identifier (URI)
+ * @param uri A value representing an encoded URI.
+ */
+declare function encodeURI(uri: string): string;
+
+/**
+ * Encodes a text string as a valid component of a Uniform Resource Identifier (URI).
+ * @param uriComponent A value representing an encoded URI component.
+ */
+declare function encodeURIComponent(uriComponent: string | number | boolean): string;
+
+/**
+ * Computes a new string in which certain characters have been replaced by a hexadecimal escape sequence.
+ * @param string A string value
+ */
+declare function escape(string: string): string;
+
+/**
+ * Computes a new string in which hexadecimal escape sequences are replaced with the character that it represents.
+ * @param string A string value
+ */
+declare function unescape(string: string): string;
+
+interface Symbol {
+ /** Returns a string representation of an object. */
+ toString(): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): symbol;
+}
+
+declare type PropertyKey = string | number | symbol;
+
+interface PropertyDescriptor {
+ configurable?: boolean;
+ enumerable?: boolean;
+ value?: any;
+ writable?: boolean;
+ get?(): any;
+ set?(v: any): void;
+}
+
+interface PropertyDescriptorMap {
+ [s: string]: PropertyDescriptor;
+}
+
+interface Object {
+ /** The initial value of Object.prototype.constructor is the standard built-in Object constructor. */
+ constructor: Function;
+
+ /** Returns a string representation of an object. */
+ toString(): string;
+
+ /** Returns a date converted to a string using the current locale. */
+ toLocaleString(): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): Object;
+
+ /**
+ * Determines whether an object has a property with the specified name.
+ * @param v A property name.
+ */
+ hasOwnProperty(v: PropertyKey): boolean;
+
+ /**
+ * Determines whether an object exists in another object's prototype chain.
+ * @param v Another object whose prototype chain is to be checked.
+ */
+ isPrototypeOf(v: Object): boolean;
+
+ /**
+ * Determines whether a specified property is enumerable.
+ * @param v A property name.
+ */
+ propertyIsEnumerable(v: PropertyKey): boolean;
+}
+
+interface ObjectConstructor {
+ new(value?: any): Object;
+ (): any;
+ (value: any): any;
+
+ /** A reference to the prototype for a class of objects. */
+ readonly prototype: Object;
+
+ /**
+ * Returns the prototype of an object.
+ * @param o The object that references the prototype.
+ */
+ getPrototypeOf(o: any): any;
+
+ /**
+ * Gets the own property descriptor of the specified object.
+ * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype.
+ * @param o Object that contains the property.
+ * @param p Name of the property.
+ */
+ getOwnPropertyDescriptor(o: any, p: PropertyKey): PropertyDescriptor | undefined;
+
+ /**
+ * Returns the names of the own properties of an object. The own properties of an object are those that are defined directly
+ * on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions.
+ * @param o Object that contains the own properties.
+ */
+ getOwnPropertyNames(o: any): string[];
+
+ /**
+ * Creates an object that has the specified prototype or that has null prototype.
+ * @param o Object to use as a prototype. May be null.
+ */
+ create(o: object | null): any;
+
+ /**
+ * Creates an object that has the specified prototype, and that optionally contains specified properties.
+ * @param o Object to use as a prototype. May be null
+ * @param properties JavaScript object that contains one or more property descriptors.
+ */
+ create(o: object | null, properties: PropertyDescriptorMap & ThisType<any>): any;
+
+ /**
+ * Adds a property to an object, or modifies attributes of an existing property.
+ * @param o Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object.
+ * @param p The property name.
+ * @param attributes Descriptor for the property. It can be for a data property or an accessor property.
+ */
+ defineProperty(o: any, p: PropertyKey, attributes: PropertyDescriptor & ThisType<any>): any;
+
+ /**
+ * Adds one or more properties to an object, and/or modifies attributes of existing properties.
+ * @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object.
+ * @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property.
+ */
+ defineProperties(o: any, properties: PropertyDescriptorMap & ThisType<any>): any;
+
+ /**
+ * Prevents the modification of attributes of existing properties, and prevents the addition of new properties.
+ * @param o Object on which to lock the attributes.
+ */
+ seal<T>(o: T): T;
+
+ /**
+ * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
+ * @param o Object on which to lock the attributes.
+ */
+ freeze<T>(a: T[]): readonly T[];
+
+ /**
+ * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
+ * @param o Object on which to lock the attributes.
+ */
+ freeze<T extends Function>(f: T): T;
+
+ /**
+ * Prevents the modification of existing property attributes and values, and prevents the addition of new properties.
+ * @param o Object on which to lock the attributes.
+ */
+ freeze<T>(o: T): Readonly<T>;
+
+ /**
+ * Prevents the addition of new properties to an object.
+ * @param o Object to make non-extensible.
+ */
+ preventExtensions<T>(o: T): T;
+
+ /**
+ * Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object.
+ * @param o Object to test.
+ */
+ isSealed(o: any): boolean;
+
+ /**
+ * Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object.
+ * @param o Object to test.
+ */
+ isFrozen(o: any): boolean;
+
+ /**
+ * Returns a value that indicates whether new properties can be added to an object.
+ * @param o Object to test.
+ */
+ isExtensible(o: any): boolean;
+
+ /**
+ * Returns the names of the enumerable string properties and methods of an object.
+ * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
+ */
+ keys(o: object): string[];
+}
+
+/**
+ * Provides functionality common to all JavaScript objects.
+ */
+declare var Object: ObjectConstructor;
+
+/**
+ * Creates a new function.
+ */
+interface Function {
+ /**
+ * Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function.
+ * @param thisArg The object to be used as the this object.
+ * @param argArray A set of arguments to be passed to the function.
+ */
+ apply(this: Function, thisArg: any, argArray?: any): any;
+
+ /**
+ * Calls a method of an object, substituting another object for the current object.
+ * @param thisArg The object to be used as the current object.
+ * @param argArray A list of arguments to be passed to the method.
+ */
+ call(this: Function, thisArg: any, ...argArray: any[]): any;
+
+ /**
+ * For a given function, creates a bound function that has the same body as the original function.
+ * The this object of the bound function is associated with the specified object, and has the specified initial parameters.
+ * @param thisArg An object to which the this keyword can refer inside the new function.
+ * @param argArray A list of arguments to be passed to the new function.
+ */
+ bind(this: Function, thisArg: any, ...argArray: any[]): any;
+
+ /** Returns a string representation of a function. */
+ toString(): string;
+
+ prototype: any;
+ readonly length: number;
+
+ // Non-standard extensions
+ arguments: any;
+ caller: Function;
+}
+
+interface FunctionConstructor {
+ /**
+ * Creates a new function.
+ * @param args A list of arguments the function accepts.
+ */
+ new(...args: string[]): Function;
+ (...args: string[]): Function;
+ readonly prototype: Function;
+}
+
+declare var Function: FunctionConstructor;
+
+/**
+ * Extracts the type of the 'this' parameter of a function type, or 'unknown' if the function type has no 'this' parameter.
+ */
+type ThisParameterType<T> = T extends (this: infer U, ...args: any[]) => any ? U : unknown;
+
+/**
+ * Removes the 'this' parameter from a function type.
+ */
+type OmitThisParameter<T> = unknown extends ThisParameterType<T> ? T : T extends (...args: infer A) => infer R ? (...args: A) => R : T;
+
+interface CallableFunction extends Function {
+ /**
+ * Calls the function with the specified object as the this value and the elements of specified array as the arguments.
+ * @param thisArg The object to be used as the this object.
+ * @param args An array of argument values to be passed to the function.
+ */
+ apply<T, R>(this: (this: T) => R, thisArg: T): R;
+ apply<T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, args: A): R;
+
+ /**
+ * Calls the function with the specified object as the this value and the specified rest arguments as the arguments.
+ * @param thisArg The object to be used as the this object.
+ * @param args Argument values to be passed to the function.
+ */
+ call<T, A extends any[], R>(this: (this: T, ...args: A) => R, thisArg: T, ...args: A): R;
+
+ /**
+ * For a given function, creates a bound function that has the same body as the original function.
+ * The this object of the bound function is associated with the specified object, and has the specified initial parameters.
+ * @param thisArg The object to be used as the this object.
+ * @param args Arguments to bind to the parameters of the function.
+ */
+ bind<T>(this: T, thisArg: ThisParameterType<T>): OmitThisParameter<T>;
+ bind<T, A0, A extends any[], R>(this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R;
+ bind<T, A0, A1, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R;
+ bind<T, A0, A1, A2, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R;
+ bind<T, A0, A1, A2, A3, A extends any[], R>(this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R;
+ bind<T, AX, R>(this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R;
+}
+
+interface NewableFunction extends Function {
+ /**
+ * Calls the function with the specified object as the this value and the elements of specified array as the arguments.
+ * @param thisArg The object to be used as the this object.
+ * @param args An array of argument values to be passed to the function.
+ */
+ apply<T>(this: new () => T, thisArg: T): void;
+ apply<T, A extends any[]>(this: new (...args: A) => T, thisArg: T, args: A): void;
+
+ /**
+ * Calls the function with the specified object as the this value and the specified rest arguments as the arguments.
+ * @param thisArg The object to be used as the this object.
+ * @param args Argument values to be passed to the function.
+ */
+ call<T, A extends any[]>(this: new (...args: A) => T, thisArg: T, ...args: A): void;
+
+ /**
+ * For a given function, creates a bound function that has the same body as the original function.
+ * The this object of the bound function is associated with the specified object, and has the specified initial parameters.
+ * @param thisArg The object to be used as the this object.
+ * @param args Arguments to bind to the parameters of the function.
+ */
+ bind<T>(this: T, thisArg: any): T;
+ bind<A0, A extends any[], R>(this: new (arg0: A0, ...args: A) => R, thisArg: any, arg0: A0): new (...args: A) => R;
+ bind<A0, A1, A extends any[], R>(this: new (arg0: A0, arg1: A1, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1): new (...args: A) => R;
+ bind<A0, A1, A2, A extends any[], R>(this: new (arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2): new (...args: A) => R;
+ bind<A0, A1, A2, A3, A extends any[], R>(this: new (arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2, arg3: A3): new (...args: A) => R;
+ bind<AX, R>(this: new (...args: AX[]) => R, thisArg: any, ...args: AX[]): new (...args: AX[]) => R;
+}
+
+interface IArguments {
+ [index: number]: any;
+ length: number;
+ callee: Function;
+}
+
+interface String {
+ /** Returns a string representation of a string. */
+ toString(): string;
+
+ /**
+ * Returns the character at the specified index.
+ * @param pos The zero-based index of the desired character.
+ */
+ charAt(pos: number): string;
+
+ /**
+ * Returns the Unicode value of the character at the specified location.
+ * @param index The zero-based index of the desired character. If there is no character at the specified index, NaN is returned.
+ */
+ charCodeAt(index: number): number;
+
+ /**
+ * Returns a string that contains the concatenation of two or more strings.
+ * @param strings The strings to append to the end of the string.
+ */
+ concat(...strings: string[]): string;
+
+ /**
+ * Returns the position of the first occurrence of a substring.
+ * @param searchString The substring to search for in the string
+ * @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string.
+ */
+ indexOf(searchString: string, position?: number): number;
+
+ /**
+ * Returns the last occurrence of a substring in the string.
+ * @param searchString The substring to search for.
+ * @param position The index at which to begin searching. If omitted, the search begins at the end of the string.
+ */
+ lastIndexOf(searchString: string, position?: number): number;
+
+ /**
+ * Determines whether two strings are equivalent in the current locale.
+ * @param that String to compare to target string
+ */
+ localeCompare(that: string): number;
+
+ /**
+ * Matches a string with a regular expression, and returns an array containing the results of that search.
+ * @param regexp A variable name or string literal containing the regular expression pattern and flags.
+ */
+ match(regexp: string | RegExp): RegExpMatchArray | null;
+
+ /**
+ * Replaces text in a string, using a regular expression or search string.
+ * @param searchValue A string to search for.
+ * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
+ */
+ replace(searchValue: string | RegExp, replaceValue: string): string;
+
+ /**
+ * Replaces text in a string, using a regular expression or search string.
+ * @param searchValue A string to search for.
+ * @param replacer A function that returns the replacement text.
+ */
+ replace(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;
+
+ /**
+ * Finds the first substring match in a regular expression search.
+ * @param regexp The regular expression pattern and applicable flags.
+ */
+ search(regexp: string | RegExp): number;
+
+ /**
+ * Returns a section of a string.
+ * @param start The index to the beginning of the specified portion of stringObj.
+ * @param end The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end.
+ * If this value is not specified, the substring continues to the end of stringObj.
+ */
+ slice(start?: number, end?: number): string;
+
+ /**
+ * Split a string into substrings using the specified separator and return them as an array.
+ * @param separator A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned.
+ * @param limit A value used to limit the number of elements returned in the array.
+ */
+ split(separator: string | RegExp, limit?: number): string[];
+
+ /**
+ * Returns the substring at the specified location within a String object.
+ * @param start The zero-based index number indicating the beginning of the substring.
+ * @param end Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end.
+ * If end is omitted, the characters from start through the end of the original string are returned.
+ */
+ substring(start: number, end?: number): string;
+
+ /** Converts all the alphabetic characters in a string to lowercase. */
+ toLowerCase(): string;
+
+ /** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */
+ toLocaleLowerCase(locales?: string | string[]): string;
+
+ /** Converts all the alphabetic characters in a string to uppercase. */
+ toUpperCase(): string;
+
+ /** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */
+ toLocaleUpperCase(locales?: string | string[]): string;
+
+ /** Removes the leading and trailing white space and line terminator characters from a string. */
+ trim(): string;
+
+ /** Returns the length of a String object. */
+ readonly length: number;
+
+ // IE extensions
+ /**
+ * Gets a substring beginning at the specified location and having the specified length.
+ * @param from The starting position of the desired substring. The index of the first character in the string is zero.
+ * @param length The number of characters to include in the returned substring.
+ */
+ substr(from: number, length?: number): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): string;
+
+ readonly [index: number]: string;
+}
+
+interface StringConstructor {
+ new(value?: any): String;
+ (value?: any): string;
+ readonly prototype: String;
+ fromCharCode(...codes: number[]): string;
+}
+
+/**
+ * Allows manipulation and formatting of text strings and determination and location of substrings within strings.
+ */
+declare var String: StringConstructor;
+
+interface Boolean {
+ /** Returns the primitive value of the specified object. */
+ valueOf(): boolean;
+}
+
+interface BooleanConstructor {
+ new(value?: any): Boolean;
+ <T>(value?: T): boolean;
+ readonly prototype: Boolean;
+}
+
+declare var Boolean: BooleanConstructor;
+
+interface Number {
+ /**
+ * Returns a string representation of an object.
+ * @param radix Specifies a radix for converting numeric values to strings. This value is only used for numbers.
+ */
+ toString(radix?: number): string;
+
+ /**
+ * Returns a string representing a number in fixed-point notation.
+ * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
+ */
+ toFixed(fractionDigits?: number): string;
+
+ /**
+ * Returns a string containing a number represented in exponential notation.
+ * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
+ */
+ toExponential(fractionDigits?: number): string;
+
+ /**
+ * Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits.
+ * @param precision Number of significant digits. Must be in the range 1 - 21, inclusive.
+ */
+ toPrecision(precision?: number): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): number;
+}
+
+interface NumberConstructor {
+ new(value?: any): Number;
+ (value?: any): number;
+ readonly prototype: Number;
+
+ /** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */
+ readonly MAX_VALUE: number;
+
+ /** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */
+ readonly MIN_VALUE: number;
+
+ /**
+ * A value that is not a number.
+ * In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function.
+ */
+ readonly NaN: number;
+
+ /**
+ * A value that is less than the largest negative number that can be represented in JavaScript.
+ * JavaScript displays NEGATIVE_INFINITY values as -infinity.
+ */
+ readonly NEGATIVE_INFINITY: number;
+
+ /**
+ * A value greater than the largest number that can be represented in JavaScript.
+ * JavaScript displays POSITIVE_INFINITY values as infinity.
+ */
+ readonly POSITIVE_INFINITY: number;
+}
+
+/** An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers. */
+declare var Number: NumberConstructor;
+
+interface TemplateStringsArray extends ReadonlyArray<string> {
+ readonly raw: readonly string[];
+}
+
+/**
+ * The type of `import.meta`.
+ *
+ * If you need to declare that a given property exists on `import.meta`,
+ * this type may be augmented via interface merging.
+ */
+interface ImportMeta {
+}
+
+interface Math {
+ /** The mathematical constant e. This is Euler's number, the base of natural logarithms. */
+ readonly E: number;
+ /** The natural logarithm of 10. */
+ readonly LN10: number;
+ /** The natural logarithm of 2. */
+ readonly LN2: number;
+ /** The base-2 logarithm of e. */
+ readonly LOG2E: number;
+ /** The base-10 logarithm of e. */
+ readonly LOG10E: number;
+ /** Pi. This is the ratio of the circumference of a circle to its diameter. */
+ readonly PI: number;
+ /** The square root of 0.5, or, equivalently, one divided by the square root of 2. */
+ readonly SQRT1_2: number;
+ /** The square root of 2. */
+ readonly SQRT2: number;
+ /**
+ * Returns the absolute value of a number (the value without regard to whether it is positive or negative).
+ * For example, the absolute value of -5 is the same as the absolute value of 5.
+ * @param x A numeric expression for which the absolute value is needed.
+ */
+ abs(x: number): number;
+ /**
+ * Returns the arc cosine (or inverse cosine) of a number.
+ * @param x A numeric expression.
+ */
+ acos(x: number): number;
+ /**
+ * Returns the arcsine of a number.
+ * @param x A numeric expression.
+ */
+ asin(x: number): number;
+ /**
+ * Returns the arctangent of a number.
+ * @param x A numeric expression for which the arctangent is needed.
+ */
+ atan(x: number): number;
+ /**
+ * Returns the angle (in radians) from the X axis to a point.
+ * @param y A numeric expression representing the cartesian y-coordinate.
+ * @param x A numeric expression representing the cartesian x-coordinate.
+ */
+ atan2(y: number, x: number): number;
+ /**
+ * Returns the smallest integer greater than or equal to its numeric argument.
+ * @param x A numeric expression.
+ */
+ ceil(x: number): number;
+ /**
+ * Returns the cosine of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ cos(x: number): number;
+ /**
+ * Returns e (the base of natural logarithms) raised to a power.
+ * @param x A numeric expression representing the power of e.
+ */
+ exp(x: number): number;
+ /**
+ * Returns the greatest integer less than or equal to its numeric argument.
+ * @param x A numeric expression.
+ */
+ floor(x: number): number;
+ /**
+ * Returns the natural logarithm (base e) of a number.
+ * @param x A numeric expression.
+ */
+ log(x: number): number;
+ /**
+ * Returns the larger of a set of supplied numeric expressions.
+ * @param values Numeric expressions to be evaluated.
+ */
+ max(...values: number[]): number;
+ /**
+ * Returns the smaller of a set of supplied numeric expressions.
+ * @param values Numeric expressions to be evaluated.
+ */
+ min(...values: number[]): number;
+ /**
+ * Returns the value of a base expression taken to a specified power.
+ * @param x The base value of the expression.
+ * @param y The exponent value of the expression.
+ */
+ pow(x: number, y: number): number;
+ /** Returns a pseudorandom number between 0 and 1. */
+ random(): number;
+ /**
+ * Returns a supplied numeric expression rounded to the nearest integer.
+ * @param x The value to be rounded to the nearest integer.
+ */
+ round(x: number): number;
+ /**
+ * Returns the sine of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ sin(x: number): number;
+ /**
+ * Returns the square root of a number.
+ * @param x A numeric expression.
+ */
+ sqrt(x: number): number;
+ /**
+ * Returns the tangent of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ tan(x: number): number;
+}
+/** An intrinsic object that provides basic mathematics functionality and constants. */
+declare var Math: Math;
+
+/** Enables basic storage and retrieval of dates and times. */
+interface Date {
+ /** Returns a string representation of a date. The format of the string depends on the locale. */
+ toString(): string;
+ /** Returns a date as a string value. */
+ toDateString(): string;
+ /** Returns a time as a string value. */
+ toTimeString(): string;
+ /** Returns a value as a string value appropriate to the host environment's current locale. */
+ toLocaleString(): string;
+ /** Returns a date as a string value appropriate to the host environment's current locale. */
+ toLocaleDateString(): string;
+ /** Returns a time as a string value appropriate to the host environment's current locale. */
+ toLocaleTimeString(): string;
+ /** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */
+ valueOf(): number;
+ /** Gets the time value in milliseconds. */
+ getTime(): number;
+ /** Gets the year, using local time. */
+ getFullYear(): number;
+ /** Gets the year using Universal Coordinated Time (UTC). */
+ getUTCFullYear(): number;
+ /** Gets the month, using local time. */
+ getMonth(): number;
+ /** Gets the month of a Date object using Universal Coordinated Time (UTC). */
+ getUTCMonth(): number;
+ /** Gets the day-of-the-month, using local time. */
+ getDate(): number;
+ /** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */
+ getUTCDate(): number;
+ /** Gets the day of the week, using local time. */
+ getDay(): number;
+ /** Gets the day of the week using Universal Coordinated Time (UTC). */
+ getUTCDay(): number;
+ /** Gets the hours in a date, using local time. */
+ getHours(): number;
+ /** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */
+ getUTCHours(): number;
+ /** Gets the minutes of a Date object, using local time. */
+ getMinutes(): number;
+ /** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */
+ getUTCMinutes(): number;
+ /** Gets the seconds of a Date object, using local time. */
+ getSeconds(): number;
+ /** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */
+ getUTCSeconds(): number;
+ /** Gets the milliseconds of a Date, using local time. */
+ getMilliseconds(): number;
+ /** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */
+ getUTCMilliseconds(): number;
+ /** Gets the difference in minutes between the time on the local computer and Universal Coordinated Time (UTC). */
+ getTimezoneOffset(): number;
+ /**
+ * Sets the date and time value in the Date object.
+ * @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT.
+ */
+ setTime(time: number): number;
+ /**
+ * Sets the milliseconds value in the Date object using local time.
+ * @param ms A numeric value equal to the millisecond value.
+ */
+ setMilliseconds(ms: number): number;
+ /**
+ * Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC).
+ * @param ms A numeric value equal to the millisecond value.
+ */
+ setUTCMilliseconds(ms: number): number;
+
+ /**
+ * Sets the seconds value in the Date object using local time.
+ * @param sec A numeric value equal to the seconds value.
+ * @param ms A numeric value equal to the milliseconds value.
+ */
+ setSeconds(sec: number, ms?: number): number;
+ /**
+ * Sets the seconds value in the Date object using Universal Coordinated Time (UTC).
+ * @param sec A numeric value equal to the seconds value.
+ * @param ms A numeric value equal to the milliseconds value.
+ */
+ setUTCSeconds(sec: number, ms?: number): number;
+ /**
+ * Sets the minutes value in the Date object using local time.
+ * @param min A numeric value equal to the minutes value.
+ * @param sec A numeric value equal to the seconds value.
+ * @param ms A numeric value equal to the milliseconds value.
+ */
+ setMinutes(min: number, sec?: number, ms?: number): number;
+ /**
+ * Sets the minutes value in the Date object using Universal Coordinated Time (UTC).
+ * @param min A numeric value equal to the minutes value.
+ * @param sec A numeric value equal to the seconds value.
+ * @param ms A numeric value equal to the milliseconds value.
+ */
+ setUTCMinutes(min: number, sec?: number, ms?: number): number;
+ /**
+ * Sets the hour value in the Date object using local time.
+ * @param hours A numeric value equal to the hours value.
+ * @param min A numeric value equal to the minutes value.
+ * @param sec A numeric value equal to the seconds value.
+ * @param ms A numeric value equal to the milliseconds value.
+ */
+ setHours(hours: number, min?: number, sec?: number, ms?: number): number;
+ /**
+ * Sets the hours value in the Date object using Universal Coordinated Time (UTC).
+ * @param hours A numeric value equal to the hours value.
+ * @param min A numeric value equal to the minutes value.
+ * @param sec A numeric value equal to the seconds value.
+ * @param ms A numeric value equal to the milliseconds value.
+ */
+ setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number;
+ /**
+ * Sets the numeric day-of-the-month value of the Date object using local time.
+ * @param date A numeric value equal to the day of the month.
+ */
+ setDate(date: number): number;
+ /**
+ * Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC).
+ * @param date A numeric value equal to the day of the month.
+ */
+ setUTCDate(date: number): number;
+ /**
+ * Sets the month value in the Date object using local time.
+ * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
+ * @param date A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used.
+ */
+ setMonth(month: number, date?: number): number;
+ /**
+ * Sets the month value in the Date object using Universal Coordinated Time (UTC).
+ * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
+ * @param date A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used.
+ */
+ setUTCMonth(month: number, date?: number): number;
+ /**
+ * Sets the year of the Date object using local time.
+ * @param year A numeric value for the year.
+ * @param month A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified.
+ * @param date A numeric value equal for the day of the month.
+ */
+ setFullYear(year: number, month?: number, date?: number): number;
+ /**
+ * Sets the year value in the Date object using Universal Coordinated Time (UTC).
+ * @param year A numeric value equal to the year.
+ * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied.
+ * @param date A numeric value equal to the day of the month.
+ */
+ setUTCFullYear(year: number, month?: number, date?: number): number;
+ /** Returns a date converted to a string using Universal Coordinated Time (UTC). */
+ toUTCString(): string;
+ /** Returns a date as a string value in ISO format. */
+ toISOString(): string;
+ /** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */
+ toJSON(key?: any): string;
+}
+
+interface DateConstructor {
+ new(): Date;
+ new(value: number | string): Date;
+ new(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date;
+ (): string;
+ readonly prototype: Date;
+ /**
+ * Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970.
+ * @param s A date string
+ */
+ parse(s: string): number;
+ /**
+ * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date.
+ * @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year.
+ * @param month The month as a number between 0 and 11 (January to December).
+ * @param date The date as a number between 1 and 31.
+ * @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour.
+ * @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes.
+ * @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds.
+ * @param ms A number from 0 to 999 that specifies the milliseconds.
+ */
+ UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number;
+ now(): number;
+}
+
+declare var Date: DateConstructor;
+
+interface RegExpMatchArray extends Array<string> {
+ index?: number;
+ input?: string;
+}
+
+interface RegExpExecArray extends Array<string> {
+ index: number;
+ input: string;
+}
+
+interface RegExp {
+ /**
+ * Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search.
+ * @param string The String object or string literal on which to perform the search.
+ */
+ exec(string: string): RegExpExecArray | null;
+
+ /**
+ * Returns a Boolean value that indicates whether or not a pattern exists in a searched string.
+ * @param string String on which to perform the search.
+ */
+ test(string: string): boolean;
+
+ /** Returns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal. */
+ readonly source: string;
+
+ /** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */
+ readonly global: boolean;
+
+ /** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */
+ readonly ignoreCase: boolean;
+
+ /** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */
+ readonly multiline: boolean;
+
+ lastIndex: number;
+
+ // Non-standard extensions
+ compile(): this;
+}
+
+interface RegExpConstructor {
+ new(pattern: RegExp | string): RegExp;
+ new(pattern: string, flags?: string): RegExp;
+ (pattern: RegExp | string): RegExp;
+ (pattern: string, flags?: string): RegExp;
+ readonly prototype: RegExp;
+
+ // Non-standard extensions
+ $1: string;
+ $2: string;
+ $3: string;
+ $4: string;
+ $5: string;
+ $6: string;
+ $7: string;
+ $8: string;
+ $9: string;
+ lastMatch: string;
+}
+
+declare var RegExp: RegExpConstructor;
+
+interface Error {
+ name: string;
+ message: string;
+ stack?: string;
+}
+
+interface ErrorConstructor {
+ new(message?: string): Error;
+ (message?: string): Error;
+ readonly prototype: Error;
+}
+
+declare var Error: ErrorConstructor;
+
+interface EvalError extends Error {
+}
+
+interface EvalErrorConstructor extends ErrorConstructor {
+ new(message?: string): EvalError;
+ (message?: string): EvalError;
+ readonly prototype: EvalError;
+}
+
+declare var EvalError: EvalErrorConstructor;
+
+interface RangeError extends Error {
+}
+
+interface RangeErrorConstructor extends ErrorConstructor {
+ new(message?: string): RangeError;
+ (message?: string): RangeError;
+ readonly prototype: RangeError;
+}
+
+declare var RangeError: RangeErrorConstructor;
+
+interface ReferenceError extends Error {
+}
+
+interface ReferenceErrorConstructor extends ErrorConstructor {
+ new(message?: string): ReferenceError;
+ (message?: string): ReferenceError;
+ readonly prototype: ReferenceError;
+}
+
+declare var ReferenceError: ReferenceErrorConstructor;
+
+interface SyntaxError extends Error {
+}
+
+interface SyntaxErrorConstructor extends ErrorConstructor {
+ new(message?: string): SyntaxError;
+ (message?: string): SyntaxError;
+ readonly prototype: SyntaxError;
+}
+
+declare var SyntaxError: SyntaxErrorConstructor;
+
+interface TypeError extends Error {
+}
+
+interface TypeErrorConstructor extends ErrorConstructor {
+ new(message?: string): TypeError;
+ (message?: string): TypeError;
+ readonly prototype: TypeError;
+}
+
+declare var TypeError: TypeErrorConstructor;
+
+interface URIError extends Error {
+}
+
+interface URIErrorConstructor extends ErrorConstructor {
+ new(message?: string): URIError;
+ (message?: string): URIError;
+ readonly prototype: URIError;
+}
+
+declare var URIError: URIErrorConstructor;
+
+interface JSON {
+ /**
+ * Converts a JavaScript Object Notation (JSON) string into an object.
+ * @param text A valid JSON string.
+ * @param reviver A function that transforms the results. This function is called for each member of the object.
+ * If a member contains nested objects, the nested objects are transformed before the parent object is.
+ */
+ parse(text: string, reviver?: (this: any, key: string, value: any) => any): any;
+ /**
+ * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
+ * @param value A JavaScript value, usually an object or array, to be converted.
+ * @param replacer A function that transforms the results.
+ * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
+ */
+ stringify(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
+ /**
+ * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
+ * @param value A JavaScript value, usually an object or array, to be converted.
+ * @param replacer An array of strings and numbers that acts as a approved list for selecting the object properties that will be stringified.
+ * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
+ */
+ stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string;
+}
+
+/**
+ * An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation (JSON) format.
+ */
+declare var JSON: JSON;
+
+
+/////////////////////////////
+/// ECMAScript Array API (specially handled by compiler)
+/////////////////////////////
+
+interface ReadonlyArray<T> {
+ /**
+ * Gets the length of the array. This is a number one higher than the highest element defined in an array.
+ */
+ readonly length: number;
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+ /**
+ * Returns a string representation of an array. The elements are converted to string using their toLocalString methods.
+ */
+ toLocaleString(): string;
+ /**
+ * Combines two or more arrays.
+ * @param items Additional items to add to the end of array1.
+ */
+ concat(...items: ConcatArray<T>[]): T[];
+ /**
+ * Combines two or more arrays.
+ * @param items Additional items to add to the end of array1.
+ */
+ concat(...items: (T | ConcatArray<T>)[]): T[];
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
+ */
+ slice(start?: number, end?: number): T[];
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
+ */
+ indexOf(searchElement: T, fromIndex?: number): number;
+ /**
+ * Returns the index of the last occurrence of a specified value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array.
+ */
+ lastIndexOf(searchElement: T, fromIndex?: number): number;
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in the array until the callbackfn returns a value
+ * which is coercible to the Boolean value false, or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean;
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls
+ * the callbackfn function for each element in the array until the callbackfn returns a value
+ * which is coercible to the Boolean value true, or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): boolean;
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (value: T, index: number, array: readonly T[]) => void, thisArg?: any): void;
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ map<U>(callbackfn: (value: T, index: number, array: readonly T[]) => U, thisArg?: any): U[];
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ filter<S extends T>(callbackfn: (value: T, index: number, array: readonly T[]) => value is S, thisArg?: any): S[];
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (value: T, index: number, array: readonly T[]) => unknown, thisArg?: any): T[];
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T;
+ reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T;
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U;
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T): T;
+ reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: readonly T[]) => T, initialValue: T): T;
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: readonly T[]) => U, initialValue: U): U;
+
+ readonly [n: number]: T;
+}
+
+interface ConcatArray<T> {
+ readonly length: number;
+ readonly [n: number]: T;
+ join(separator?: string): string;
+ slice(start?: number, end?: number): T[];
+}
+
+interface Array<T> {
+ /**
+ * Gets or sets the length of the array. This is a number one higher than the highest element defined in an array.
+ */
+ length: number;
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+ /**
+ * Returns a string representation of an array. The elements are converted to string using their toLocalString methods.
+ */
+ toLocaleString(): string;
+ /**
+ * Removes the last element from an array and returns it.
+ */
+ pop(): T | undefined;
+ /**
+ * Appends new elements to an array, and returns the new length of the array.
+ * @param items New elements of the Array.
+ */
+ push(...items: T[]): number;
+ /**
+ * Combines two or more arrays.
+ * @param items Additional items to add to the end of array1.
+ */
+ concat(...items: ConcatArray<T>[]): T[];
+ /**
+ * Combines two or more arrays.
+ * @param items Additional items to add to the end of array1.
+ */
+ concat(...items: (T | ConcatArray<T>)[]): T[];
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): T[];
+ /**
+ * Removes the first element from an array and returns it.
+ */
+ shift(): T | undefined;
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
+ */
+ slice(start?: number, end?: number): T[];
+ /**
+ * Sorts an array.
+ * @param compareFn Function used to determine the order of the elements. It is expected to return
+ * a negative value if first argument is less than second argument, zero if they're equal and a positive
+ * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
+ * ```ts
+ * [11,2,22,1].sort((a, b) => a - b)
+ * ```
+ */
+ sort(compareFn?: (a: T, b: T) => number): this;
+ /**
+ * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
+ * @param start The zero-based location in the array from which to start removing elements.
+ * @param deleteCount The number of elements to remove.
+ */
+ splice(start: number, deleteCount?: number): T[];
+ /**
+ * Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
+ * @param start The zero-based location in the array from which to start removing elements.
+ * @param deleteCount The number of elements to remove.
+ * @param items Elements to insert into the array in place of the deleted elements.
+ */
+ splice(start: number, deleteCount: number, ...items: T[]): T[];
+ /**
+ * Inserts new elements at the start of an array.
+ * @param items Elements to insert at the start of the Array.
+ */
+ unshift(...items: T[]): number;
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
+ */
+ indexOf(searchElement: T, fromIndex?: number): number;
+ /**
+ * Returns the index of the last occurrence of a specified value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array.
+ */
+ lastIndexOf(searchElement: T, fromIndex?: number): number;
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in the array until the callbackfn returns a value
+ * which is coercible to the Boolean value false, or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean;
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls
+ * the callbackfn function for each element in the array until the callbackfn returns a value
+ * which is coercible to the Boolean value true, or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (value: T, index: number, array: T[]) => unknown, thisArg?: any): boolean;
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void;
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ map<U>(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[];
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ filter<S extends T>(callbackfn: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S[];
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (value: T, index: number, array: T[]) => unknown, thisArg?: any): T[];
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T;
+ reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T;
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T): T;
+ reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue: T): T;
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;
+
+ [n: number]: T;
+}
+
+interface ArrayConstructor {
+ new(arrayLength?: number): any[];
+ new <T>(arrayLength: number): T[];
+ new <T>(...items: T[]): T[];
+ (arrayLength?: number): any[];
+ <T>(arrayLength: number): T[];
+ <T>(...items: T[]): T[];
+ isArray(arg: any): arg is any[];
+ readonly prototype: any[];
+}
+
+declare var Array: ArrayConstructor;
+
+interface TypedPropertyDescriptor<T> {
+ enumerable?: boolean;
+ configurable?: boolean;
+ writable?: boolean;
+ value?: T;
+ get?: () => T;
+ set?: (value: T) => void;
+}
+
+declare type ClassDecorator = <TFunction extends Function>(target: TFunction) => TFunction | void;
+declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void;
+declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
+declare type ParameterDecorator = (target: Object, propertyKey: string | symbol, parameterIndex: number) => void;
+
+declare type PromiseConstructorLike = new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void) => PromiseLike<T>;
+
+interface PromiseLike<T> {
+ /**
+ * Attaches callbacks for the resolution and/or rejection of the Promise.
+ * @param onfulfilled The callback to execute when the Promise is resolved.
+ * @param onrejected The callback to execute when the Promise is rejected.
+ * @returns A Promise for the completion of which ever callback is executed.
+ */
+ then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): PromiseLike<TResult1 | TResult2>;
+}
+
+/**
+ * Represents the completion of an asynchronous operation
+ */
+interface Promise<T> {
+ /**
+ * Attaches callbacks for the resolution and/or rejection of the Promise.
+ * @param onfulfilled The callback to execute when the Promise is resolved.
+ * @param onrejected The callback to execute when the Promise is rejected.
+ * @returns A Promise for the completion of which ever callback is executed.
+ */
+ then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): Promise<TResult1 | TResult2>;
+
+ /**
+ * Attaches a callback for only the rejection of the Promise.
+ * @param onrejected The callback to execute when the Promise is rejected.
+ * @returns A Promise for the completion of the callback.
+ */
+ catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<T | TResult>;
+}
+
+interface ArrayLike<T> {
+ readonly length: number;
+ readonly [n: number]: T;
+}
+
+/**
+ * Make all properties in T optional
+ */
+type Partial<T> = {
+ [P in keyof T]?: T[P];
+};
+
+/**
+ * Make all properties in T required
+ */
+type Required<T> = {
+ [P in keyof T]-?: T[P];
+};
+
+/**
+ * Make all properties in T readonly
+ */
+type Readonly<T> = {
+ readonly [P in keyof T]: T[P];
+};
+
+/**
+ * From T, pick a set of properties whose keys are in the union K
+ */
+type Pick<T, K extends keyof T> = {
+ [P in K]: T[P];
+};
+
+/**
+ * Construct a type with a set of properties K of type T
+ */
+type Record<K extends keyof any, T> = {
+ [P in K]: T;
+};
+
+/**
+ * Exclude from T those types that are assignable to U
+ */
+type Exclude<T, U> = T extends U ? never : T;
+
+/**
+ * Extract from T those types that are assignable to U
+ */
+type Extract<T, U> = T extends U ? T : never;
+
+/**
+ * Construct a type with the properties of T except for those in type K.
+ */
+type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;
+
+/**
+ * Exclude null and undefined from T
+ */
+type NonNullable<T> = T extends null | undefined ? never : T;
+
+/**
+ * Obtain the parameters of a function type in a tuple
+ */
+type Parameters<T extends (...args: any) => any> = T extends (...args: infer P) => any ? P : never;
+
+/**
+ * Obtain the parameters of a constructor function type in a tuple
+ */
+type ConstructorParameters<T extends new (...args: any) => any> = T extends new (...args: infer P) => any ? P : never;
+
+/**
+ * Obtain the return type of a function type
+ */
+type ReturnType<T extends (...args: any) => any> = T extends (...args: any) => infer R ? R : any;
+
+/**
+ * Obtain the return type of a constructor function type
+ */
+type InstanceType<T extends new (...args: any) => any> = T extends new (...args: any) => infer R ? R : any;
+
+/**
+ * Marker for contextual 'this' type
+ */
+interface ThisType<T> { }
+
+/**
+ * Represents a raw buffer of binary data, which is used to store data for the
+ * different typed arrays. ArrayBuffers cannot be read from or written to directly,
+ * but can be passed to a typed array or DataView Object to interpret the raw
+ * buffer as needed.
+ */
+interface ArrayBuffer {
+ /**
+ * Read-only. The length of the ArrayBuffer (in bytes).
+ */
+ readonly byteLength: number;
+
+ /**
+ * Returns a section of an ArrayBuffer.
+ */
+ slice(begin: number, end?: number): ArrayBuffer;
+}
+
+/**
+ * Allowed ArrayBuffer types for the buffer of an ArrayBufferView and related Typed Arrays.
+ */
+interface ArrayBufferTypes {
+ ArrayBuffer: ArrayBuffer;
+}
+type ArrayBufferLike = ArrayBufferTypes[keyof ArrayBufferTypes];
+
+interface ArrayBufferConstructor {
+ readonly prototype: ArrayBuffer;
+ new(byteLength: number): ArrayBuffer;
+ isView(arg: any): arg is ArrayBufferView;
+}
+declare var ArrayBuffer: ArrayBufferConstructor;
+
+interface ArrayBufferView {
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ buffer: ArrayBufferLike;
+
+ /**
+ * The length in bytes of the array.
+ */
+ byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ byteOffset: number;
+}
+
+interface DataView {
+ readonly buffer: ArrayBuffer;
+ readonly byteLength: number;
+ readonly byteOffset: number;
+ /**
+ * Gets the Float32 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getFloat32(byteOffset: number, littleEndian?: boolean): number;
+
+ /**
+ * Gets the Float64 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getFloat64(byteOffset: number, littleEndian?: boolean): number;
+
+ /**
+ * Gets the Int8 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getInt8(byteOffset: number): number;
+
+ /**
+ * Gets the Int16 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getInt16(byteOffset: number, littleEndian?: boolean): number;
+ /**
+ * Gets the Int32 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getInt32(byteOffset: number, littleEndian?: boolean): number;
+
+ /**
+ * Gets the Uint8 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getUint8(byteOffset: number): number;
+
+ /**
+ * Gets the Uint16 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getUint16(byteOffset: number, littleEndian?: boolean): number;
+
+ /**
+ * Gets the Uint32 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getUint32(byteOffset: number, littleEndian?: boolean): number;
+
+ /**
+ * Stores an Float32 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ * @param littleEndian If false or undefined, a big-endian value should be written,
+ * otherwise a little-endian value should be written.
+ */
+ setFloat32(byteOffset: number, value: number, littleEndian?: boolean): void;
+
+ /**
+ * Stores an Float64 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ * @param littleEndian If false or undefined, a big-endian value should be written,
+ * otherwise a little-endian value should be written.
+ */
+ setFloat64(byteOffset: number, value: number, littleEndian?: boolean): void;
+
+ /**
+ * Stores an Int8 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ */
+ setInt8(byteOffset: number, value: number): void;
+
+ /**
+ * Stores an Int16 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ * @param littleEndian If false or undefined, a big-endian value should be written,
+ * otherwise a little-endian value should be written.
+ */
+ setInt16(byteOffset: number, value: number, littleEndian?: boolean): void;
+
+ /**
+ * Stores an Int32 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ * @param littleEndian If false or undefined, a big-endian value should be written,
+ * otherwise a little-endian value should be written.
+ */
+ setInt32(byteOffset: number, value: number, littleEndian?: boolean): void;
+
+ /**
+ * Stores an Uint8 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ */
+ setUint8(byteOffset: number, value: number): void;
+
+ /**
+ * Stores an Uint16 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ * @param littleEndian If false or undefined, a big-endian value should be written,
+ * otherwise a little-endian value should be written.
+ */
+ setUint16(byteOffset: number, value: number, littleEndian?: boolean): void;
+
+ /**
+ * Stores an Uint32 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ * @param littleEndian If false or undefined, a big-endian value should be written,
+ * otherwise a little-endian value should be written.
+ */
+ setUint32(byteOffset: number, value: number, littleEndian?: boolean): void;
+}
+
+interface DataViewConstructor {
+ new(buffer: ArrayBufferLike, byteOffset?: number, byteLength?: number): DataView;
+}
+declare var DataView: DataViewConstructor;
+
+/**
+ * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested
+ * number of bytes could not be allocated an exception is raised.
+ */
+interface Int8Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBufferLike;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in the array until the callbackfn returns a value
+ * which is coercible to the Boolean value false, or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (value: number, index: number, array: Int8Array) => unknown, thisArg?: any): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): this;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (value: number, index: number, array: Int8Array) => any, thisArg?: any): Int8Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (value: number, index: number, obj: Int8Array) => boolean, thisArg?: any): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (value: number, index: number, obj: Int8Array) => boolean, thisArg?: any): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (value: number, index: number, array: Int8Array) => void, thisArg?: any): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (value: number, index: number, array: Int8Array) => number, thisArg?: any): Int8Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number): number;
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number): number;
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Int8Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
+ */
+ slice(start?: number, end?: number): Int8Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls
+ * the callbackfn function for each element in the array until the callbackfn returns a value
+ * which is coercible to the Boolean value true, or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (value: number, index: number, array: Int8Array) => unknown, thisArg?: any): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn Function used to determine the order of the elements. It is expected to return
+ * a negative value if first argument is less than second argument, zero if they're equal and a positive
+ * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
+ * ```ts
+ * [11,2,22,1].sort((a, b) => a - b)
+ * ```
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin?: number, end?: number): Int8Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): Int8Array;
+
+ [index: number]: number;
+}
+interface Int8ArrayConstructor {
+ readonly prototype: Int8Array;
+ new(length: number): Int8Array;
+ new(arrayOrArrayBuffer: ArrayLike<number> | ArrayBufferLike): Int8Array;
+ new(buffer: ArrayBufferLike, byteOffset: number, length?: number): Int8Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Int8Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ */
+ from(arrayLike: ArrayLike<number>): Int8Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Int8Array;
+
+
+}
+declare var Int8Array: Int8ArrayConstructor;
+
+/**
+ * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint8Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBufferLike;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in the array until the callbackfn returns a value
+ * which is coercible to the Boolean value false, or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (value: number, index: number, array: Uint8Array) => unknown, thisArg?: any): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): this;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (value: number, index: number, array: Uint8Array) => any, thisArg?: any): Uint8Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (value: number, index: number, obj: Uint8Array) => boolean, thisArg?: any): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (value: number, index: number, obj: Uint8Array) => boolean, thisArg?: any): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (value: number, index: number, array: Uint8Array) => void, thisArg?: any): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (value: number, index: number, array: Uint8Array) => number, thisArg?: any): Uint8Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number): number;
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number): number;
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Uint8Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
+ */
+ slice(start?: number, end?: number): Uint8Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls
+ * the callbackfn function for each element in the array until the callbackfn returns a value
+ * which is coercible to the Boolean value true, or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (value: number, index: number, array: Uint8Array) => unknown, thisArg?: any): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn Function used to determine the order of the elements. It is expected to return
+ * a negative value if first argument is less than second argument, zero if they're equal and a positive
+ * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
+ * ```ts
+ * [11,2,22,1].sort((a, b) => a - b)
+ * ```
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin?: number, end?: number): Uint8Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): Uint8Array;
+
+ [index: number]: number;
+}
+
+interface Uint8ArrayConstructor {
+ readonly prototype: Uint8Array;
+ new(length: number): Uint8Array;
+ new(arrayOrArrayBuffer: ArrayLike<number> | ArrayBufferLike): Uint8Array;
+ new(buffer: ArrayBufferLike, byteOffset: number, length?: number): Uint8Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Uint8Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ */
+ from(arrayLike: ArrayLike<number>): Uint8Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8Array;
+
+}
+declare var Uint8Array: Uint8ArrayConstructor;
+
+/**
+ * A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0.
+ * If the requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint8ClampedArray {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBufferLike;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in the array until the callbackfn returns a value
+ * which is coercible to the Boolean value false, or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => unknown, thisArg?: any): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): this;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => any, thisArg?: any): Uint8ClampedArray;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (value: number, index: number, obj: Uint8ClampedArray) => boolean, thisArg?: any): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (value: number, index: number, obj: Uint8ClampedArray) => boolean, thisArg?: any): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => void, thisArg?: any): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => number, thisArg?: any): Uint8ClampedArray;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number): number;
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number): number;
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Uint8ClampedArray;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
+ */
+ slice(start?: number, end?: number): Uint8ClampedArray;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls
+ * the callbackfn function for each element in the array until the callbackfn returns a value
+ * which is coercible to the Boolean value true, or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => unknown, thisArg?: any): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn Function used to determine the order of the elements. It is expected to return
+ * a negative value if first argument is less than second argument, zero if they're equal and a positive
+ * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
+ * ```ts
+ * [11,2,22,1].sort((a, b) => a - b)
+ * ```
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * Gets a new Uint8ClampedArray view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin?: number, end?: number): Uint8ClampedArray;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): Uint8ClampedArray;
+
+ [index: number]: number;
+}
+
+interface Uint8ClampedArrayConstructor {
+ readonly prototype: Uint8ClampedArray;
+ new(length: number): Uint8ClampedArray;
+ new(arrayOrArrayBuffer: ArrayLike<number> | ArrayBufferLike): Uint8ClampedArray;
+ new(buffer: ArrayBufferLike, byteOffset: number, length?: number): Uint8ClampedArray;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Uint8ClampedArray;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ */
+ from(arrayLike: ArrayLike<number>): Uint8ClampedArray;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray;
+}
+declare var Uint8ClampedArray: Uint8ClampedArrayConstructor;
+
+/**
+ * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Int16Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBufferLike;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in the array until the callbackfn returns a value
+ * which is coercible to the Boolean value false, or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (value: number, index: number, array: Int16Array) => unknown, thisArg?: any): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): this;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (value: number, index: number, array: Int16Array) => any, thisArg?: any): Int16Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (value: number, index: number, obj: Int16Array) => boolean, thisArg?: any): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (value: number, index: number, obj: Int16Array) => boolean, thisArg?: any): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (value: number, index: number, array: Int16Array) => void, thisArg?: any): void;
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (value: number, index: number, array: Int16Array) => number, thisArg?: any): Int16Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number): number;
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number): number;
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Int16Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
+ */
+ slice(start?: number, end?: number): Int16Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls
+ * the callbackfn function for each element in the array until the callbackfn returns a value
+ * which is coercible to the Boolean value true, or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (value: number, index: number, array: Int16Array) => unknown, thisArg?: any): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn Function used to determine the order of the elements. It is expected to return
+ * a negative value if first argument is less than second argument, zero if they're equal and a positive
+ * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
+ * ```ts
+ * [11,2,22,1].sort((a, b) => a - b)
+ * ```
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin?: number, end?: number): Int16Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): Int16Array;
+
+ [index: number]: number;
+}
+
+interface Int16ArrayConstructor {
+ readonly prototype: Int16Array;
+ new(length: number): Int16Array;
+ new(arrayOrArrayBuffer: ArrayLike<number> | ArrayBufferLike): Int16Array;
+ new(buffer: ArrayBufferLike, byteOffset: number, length?: number): Int16Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Int16Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ */
+ from(arrayLike: ArrayLike<number>): Int16Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Int16Array;
+
+
+}
+declare var Int16Array: Int16ArrayConstructor;
+
+/**
+ * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint16Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBufferLike;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in the array until the callbackfn returns a value
+ * which is coercible to the Boolean value false, or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (value: number, index: number, array: Uint16Array) => unknown, thisArg?: any): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): this;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (value: number, index: number, array: Uint16Array) => any, thisArg?: any): Uint16Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (value: number, index: number, obj: Uint16Array) => boolean, thisArg?: any): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (value: number, index: number, obj: Uint16Array) => boolean, thisArg?: any): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (value: number, index: number, array: Uint16Array) => void, thisArg?: any): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (value: number, index: number, array: Uint16Array) => number, thisArg?: any): Uint16Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number): number;
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number): number;
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Uint16Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
+ */
+ slice(start?: number, end?: number): Uint16Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls
+ * the callbackfn function for each element in the array until the callbackfn returns a value
+ * which is coercible to the Boolean value true, or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (value: number, index: number, array: Uint16Array) => unknown, thisArg?: any): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn Function used to determine the order of the elements. It is expected to return
+ * a negative value if first argument is less than second argument, zero if they're equal and a positive
+ * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
+ * ```ts
+ * [11,2,22,1].sort((a, b) => a - b)
+ * ```
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * Gets a new Uint16Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin?: number, end?: number): Uint16Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): Uint16Array;
+
+ [index: number]: number;
+}
+
+interface Uint16ArrayConstructor {
+ readonly prototype: Uint16Array;
+ new(length: number): Uint16Array;
+ new(arrayOrArrayBuffer: ArrayLike<number> | ArrayBufferLike): Uint16Array;
+ new(buffer: ArrayBufferLike, byteOffset: number, length?: number): Uint16Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Uint16Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ */
+ from(arrayLike: ArrayLike<number>): Uint16Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint16Array;
+
+
+}
+declare var Uint16Array: Uint16ArrayConstructor;
+/**
+ * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Int32Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBufferLike;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in the array until the callbackfn returns a value
+ * which is coercible to the Boolean value false, or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (value: number, index: number, array: Int32Array) => unknown, thisArg?: any): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): this;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (value: number, index: number, array: Int32Array) => any, thisArg?: any): Int32Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (value: number, index: number, obj: Int32Array) => boolean, thisArg?: any): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (value: number, index: number, obj: Int32Array) => boolean, thisArg?: any): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (value: number, index: number, array: Int32Array) => void, thisArg?: any): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (value: number, index: number, array: Int32Array) => number, thisArg?: any): Int32Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number): number;
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number): number;
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Int32Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
+ */
+ slice(start?: number, end?: number): Int32Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls
+ * the callbackfn function for each element in the array until the callbackfn returns a value
+ * which is coercible to the Boolean value true, or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (value: number, index: number, array: Int32Array) => unknown, thisArg?: any): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn Function used to determine the order of the elements. It is expected to return
+ * a negative value if first argument is less than second argument, zero if they're equal and a positive
+ * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
+ * ```ts
+ * [11,2,22,1].sort((a, b) => a - b)
+ * ```
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * Gets a new Int32Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin?: number, end?: number): Int32Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): Int32Array;
+
+ [index: number]: number;
+}
+
+interface Int32ArrayConstructor {
+ readonly prototype: Int32Array;
+ new(length: number): Int32Array;
+ new(arrayOrArrayBuffer: ArrayLike<number> | ArrayBufferLike): Int32Array;
+ new(buffer: ArrayBufferLike, byteOffset: number, length?: number): Int32Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Int32Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ */
+ from(arrayLike: ArrayLike<number>): Int32Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Int32Array;
+
+}
+declare var Int32Array: Int32ArrayConstructor;
+
+/**
+ * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint32Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBufferLike;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in the array until the callbackfn returns a value
+ * which is coercible to the Boolean value false, or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (value: number, index: number, array: Uint32Array) => unknown, thisArg?: any): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): this;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (value: number, index: number, array: Uint32Array) => any, thisArg?: any): Uint32Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (value: number, index: number, obj: Uint32Array) => boolean, thisArg?: any): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (value: number, index: number, obj: Uint32Array) => boolean, thisArg?: any): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (value: number, index: number, array: Uint32Array) => void, thisArg?: any): void;
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (value: number, index: number, array: Uint32Array) => number, thisArg?: any): Uint32Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number): number;
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number): number;
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Uint32Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
+ */
+ slice(start?: number, end?: number): Uint32Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls
+ * the callbackfn function for each element in the array until the callbackfn returns a value
+ * which is coercible to the Boolean value true, or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (value: number, index: number, array: Uint32Array) => unknown, thisArg?: any): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn Function used to determine the order of the elements. It is expected to return
+ * a negative value if first argument is less than second argument, zero if they're equal and a positive
+ * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
+ * ```ts
+ * [11,2,22,1].sort((a, b) => a - b)
+ * ```
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * Gets a new Uint32Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin?: number, end?: number): Uint32Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): Uint32Array;
+
+ [index: number]: number;
+}
+
+interface Uint32ArrayConstructor {
+ readonly prototype: Uint32Array;
+ new(length: number): Uint32Array;
+ new(arrayOrArrayBuffer: ArrayLike<number> | ArrayBufferLike): Uint32Array;
+ new(buffer: ArrayBufferLike, byteOffset: number, length?: number): Uint32Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Uint32Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ */
+ from(arrayLike: ArrayLike<number>): Uint32Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Uint32Array;
+
+}
+declare var Uint32Array: Uint32ArrayConstructor;
+
+/**
+ * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number
+ * of bytes could not be allocated an exception is raised.
+ */
+interface Float32Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBufferLike;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in the array until the callbackfn returns a value
+ * which is coercible to the Boolean value false, or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (value: number, index: number, array: Float32Array) => unknown, thisArg?: any): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): this;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (value: number, index: number, array: Float32Array) => any, thisArg?: any): Float32Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (value: number, index: number, obj: Float32Array) => boolean, thisArg?: any): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (value: number, index: number, obj: Float32Array) => boolean, thisArg?: any): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (value: number, index: number, array: Float32Array) => void, thisArg?: any): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (value: number, index: number, array: Float32Array) => number, thisArg?: any): Float32Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number): number;
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number): number;
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Float32Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
+ */
+ slice(start?: number, end?: number): Float32Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls
+ * the callbackfn function for each element in the array until the callbackfn returns a value
+ * which is coercible to the Boolean value true, or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (value: number, index: number, array: Float32Array) => unknown, thisArg?: any): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn Function used to determine the order of the elements. It is expected to return
+ * a negative value if first argument is less than second argument, zero if they're equal and a positive
+ * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
+ * ```ts
+ * [11,2,22,1].sort((a, b) => a - b)
+ * ```
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * Gets a new Float32Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin?: number, end?: number): Float32Array;
+
+ /**
+ * Converts a number to a string by using the current locale.
+ */
+ toLocaleString(): string;
+
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): Float32Array;
+
+ [index: number]: number;
+}
+
+interface Float32ArrayConstructor {
+ readonly prototype: Float32Array;
+ new(length: number): Float32Array;
+ new(arrayOrArrayBuffer: ArrayLike<number> | ArrayBufferLike): Float32Array;
+ new(buffer: ArrayBufferLike, byteOffset: number, length?: number): Float32Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Float32Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ */
+ from(arrayLike: ArrayLike<number>): Float32Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Float32Array;
+
+
+}
+declare var Float32Array: Float32ArrayConstructor;
+
+/**
+ * A typed array of 64-bit float values. The contents are initialized to 0. If the requested
+ * number of bytes could not be allocated an exception is raised.
+ */
+interface Float64Array {
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * The ArrayBuffer instance referenced by the array.
+ */
+ readonly buffer: ArrayBufferLike;
+
+ /**
+ * The length in bytes of the array.
+ */
+ readonly byteLength: number;
+
+ /**
+ * The offset in bytes of the array.
+ */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in the array until the callbackfn returns a value
+ * which is coercible to the Boolean value false, or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (value: number, index: number, array: Float64Array) => unknown, thisArg?: any): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: number, start?: number, end?: number): this;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (value: number, index: number, array: Float64Array) => any, thisArg?: any): Float64Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (value: number, index: number, obj: Float64Array) => boolean, thisArg?: any): number | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (value: number, index: number, obj: Float64Array) => boolean, thisArg?: any): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (value: number, index: number, array: Float64Array) => void, thisArg?: any): void;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: number, fromIndex?: number): number;
+
+ /**
+ * The length of the array.
+ */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (value: number, index: number, array: Float64Array) => number, thisArg?: any): Float64Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number): number;
+ reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number): number;
+ reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue: number): number;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U;
+
+ /**
+ * Reverses the elements in an Array.
+ */
+ reverse(): Float64Array;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<number>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array. This is exclusive of the element at the index 'end'.
+ */
+ slice(start?: number, end?: number): Float64Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls
+ * the callbackfn function for each element in the array until the callbackfn returns a value
+ * which is coercible to the Boolean value true, or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (value: number, index: number, array: Float64Array) => unknown, thisArg?: any): boolean;
+
+ /**
+ * Sorts an array.
+ * @param compareFn Function used to determine the order of the elements. It is expected to return
+ * a negative value if first argument is less than second argument, zero if they're equal and a positive
+ * value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.
+ * ```ts
+ * [11,2,22,1].sort((a, b) => a - b)
+ * ```
+ */
+ sort(compareFn?: (a: number, b: number) => number): this;
+
+ /**
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin?: number, end?: number): Float64Array;
+
+ toString(): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): Float64Array;
+
+ [index: number]: number;
+}
+
+interface Float64ArrayConstructor {
+ readonly prototype: Float64Array;
+ new(length: number): Float64Array;
+ new(arrayOrArrayBuffer: ArrayLike<number> | ArrayBufferLike): Float64Array;
+ new(buffer: ArrayBufferLike, byteOffset: number, length?: number): Float64Array;
+
+ /**
+ * The size in bytes of each element in the array.
+ */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: number[]): Float64Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ */
+ from(arrayLike: ArrayLike<number>): Float64Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from<T>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Float64Array;
+
+}
+declare var Float64Array: Float64ArrayConstructor;
+
+/////////////////////////////
+/// ECMAScript Internationalization API
+/////////////////////////////
+
+declare namespace Intl {
+ interface CollatorOptions {
+ usage?: string;
+ localeMatcher?: string;
+ numeric?: boolean;
+ caseFirst?: string;
+ sensitivity?: string;
+ ignorePunctuation?: boolean;
+ }
+
+ interface ResolvedCollatorOptions {
+ locale: string;
+ usage: string;
+ sensitivity: string;
+ ignorePunctuation: boolean;
+ collation: string;
+ caseFirst: string;
+ numeric: boolean;
+ }
+
+ interface Collator {
+ compare(x: string, y: string): number;
+ resolvedOptions(): ResolvedCollatorOptions;
+ }
+ var Collator: {
+ new(locales?: string | string[], options?: CollatorOptions): Collator;
+ (locales?: string | string[], options?: CollatorOptions): Collator;
+ supportedLocalesOf(locales: string | string[], options?: CollatorOptions): string[];
+ };
+
+ interface NumberFormatOptions {
+ localeMatcher?: string;
+ style?: string;
+ currency?: string;
+ currencyDisplay?: string;
+ useGrouping?: boolean;
+ minimumIntegerDigits?: number;
+ minimumFractionDigits?: number;
+ maximumFractionDigits?: number;
+ minimumSignificantDigits?: number;
+ maximumSignificantDigits?: number;
+ }
+
+ interface ResolvedNumberFormatOptions {
+ locale: string;
+ numberingSystem: string;
+ style: string;
+ currency?: string;
+ currencyDisplay?: string;
+ minimumIntegerDigits: number;
+ minimumFractionDigits: number;
+ maximumFractionDigits: number;
+ minimumSignificantDigits?: number;
+ maximumSignificantDigits?: number;
+ useGrouping: boolean;
+ }
+
+ interface NumberFormat {
+ format(value: number): string;
+ resolvedOptions(): ResolvedNumberFormatOptions;
+ }
+ var NumberFormat: {
+ new(locales?: string | string[], options?: NumberFormatOptions): NumberFormat;
+ (locales?: string | string[], options?: NumberFormatOptions): NumberFormat;
+ supportedLocalesOf(locales: string | string[], options?: NumberFormatOptions): string[];
+ };
+
+ interface DateTimeFormatOptions {
+ localeMatcher?: string;
+ weekday?: string;
+ era?: string;
+ year?: string;
+ month?: string;
+ day?: string;
+ hour?: string;
+ minute?: string;
+ second?: string;
+ timeZoneName?: string;
+ formatMatcher?: string;
+ hour12?: boolean;
+ timeZone?: string;
+ }
+
+ interface ResolvedDateTimeFormatOptions {
+ locale: string;
+ calendar: string;
+ numberingSystem: string;
+ timeZone: string;
+ hour12?: boolean;
+ weekday?: string;
+ era?: string;
+ year?: string;
+ month?: string;
+ day?: string;
+ hour?: string;
+ minute?: string;
+ second?: string;
+ timeZoneName?: string;
+ }
+
+ interface DateTimeFormat {
+ format(date?: Date | number): string;
+ resolvedOptions(): ResolvedDateTimeFormatOptions;
+ }
+ var DateTimeFormat: {
+ new(locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat;
+ (locales?: string | string[], options?: DateTimeFormatOptions): DateTimeFormat;
+ supportedLocalesOf(locales: string | string[], options?: DateTimeFormatOptions): string[];
+ };
+}
+
+interface String {
+ /**
+ * Determines whether two strings are equivalent in the current or specified locale.
+ * @param that String to compare to target string
+ * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details.
+ * @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details.
+ */
+ localeCompare(that: string, locales?: string | string[], options?: Intl.CollatorOptions): number;
+}
+
+interface Number {
+ /**
+ * Converts a number to a string by using the current or specified locale.
+ * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
+ * @param options An object that contains one or more properties that specify comparison options.
+ */
+ toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string;
+}
+
+interface Date {
+ /**
+ * Converts a date and time to a string by using the current or specified locale.
+ * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
+ * @param options An object that contains one or more properties that specify comparison options.
+ */
+ toLocaleString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
+ /**
+ * Converts a date to a string by using the current or specified locale.
+ * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
+ * @param options An object that contains one or more properties that specify comparison options.
+ */
+ toLocaleDateString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
+
+ /**
+ * Converts a time to a string by using the current or specified locale.
+ * @param locales A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
+ * @param options An object that contains one or more properties that specify comparison options.
+ */
+ toLocaleTimeString(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
+}
diff --git a/cli/dts/lib.es6.d.ts b/cli/dts/lib.es6.d.ts
new file mode 100644
index 000000000..fabf43861
--- /dev/null
+++ b/cli/dts/lib.es6.d.ts
@@ -0,0 +1,25 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2015" />
+/// <reference lib="dom" />
+/// <reference lib="dom.iterable" />
+/// <reference lib="webworker.importscripts" />
+/// <reference lib="scripthost" />
diff --git a/cli/dts/lib.esnext.array.d.ts b/cli/dts/lib.esnext.array.d.ts
new file mode 100644
index 000000000..6c7512232
--- /dev/null
+++ b/cli/dts/lib.esnext.array.d.ts
@@ -0,0 +1,223 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+interface ReadonlyArray<T> {
+
+ /**
+ * Calls a defined callback function on each element of an array. Then, flattens the result into
+ * a new array.
+ * This is identical to a map followed by flat with depth 1.
+ *
+ * @param callback A function that accepts up to three arguments. The flatMap method calls the
+ * callback function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callback function. If
+ * thisArg is omitted, undefined is used as the this value.
+ */
+ flatMap<U, This = undefined> (
+ callback: (this: This, value: T, index: number, array: T[]) => U|ReadonlyArray<U>,
+ thisArg?: This
+ ): U[]
+
+
+ /**
+ * Returns a new array with all sub-array elements concatenated into it recursively up to the
+ * specified depth.
+ *
+ * @param depth The maximum recursion depth
+ */
+ flat<U>(this:
+ ReadonlyArray<U[][][][]> |
+
+ ReadonlyArray<ReadonlyArray<U[][][]>> |
+ ReadonlyArray<ReadonlyArray<U[][]>[]> |
+ ReadonlyArray<ReadonlyArray<U[]>[][]> |
+ ReadonlyArray<ReadonlyArray<U>[][][]> |
+
+ ReadonlyArray<ReadonlyArray<ReadonlyArray<U[][]>>> |
+ ReadonlyArray<ReadonlyArray<ReadonlyArray<U>[][]>> |
+ ReadonlyArray<ReadonlyArray<ReadonlyArray<U>>[][]> |
+ ReadonlyArray<ReadonlyArray<ReadonlyArray<U>[]>[]> |
+ ReadonlyArray<ReadonlyArray<ReadonlyArray<U[]>>[]> |
+ ReadonlyArray<ReadonlyArray<ReadonlyArray<U[]>[]>> |
+
+ ReadonlyArray<ReadonlyArray<ReadonlyArray<ReadonlyArray<U[]>>>> |
+ ReadonlyArray<ReadonlyArray<ReadonlyArray<ReadonlyArray<U>[]>>> |
+ ReadonlyArray<ReadonlyArray<ReadonlyArray<ReadonlyArray<U>>[]>> |
+ ReadonlyArray<ReadonlyArray<ReadonlyArray<ReadonlyArray<U>>>[]> |
+
+ ReadonlyArray<ReadonlyArray<ReadonlyArray<ReadonlyArray<ReadonlyArray<U>>>>>,
+ depth: 4): U[];
+
+ /**
+ * Returns a new array with all sub-array elements concatenated into it recursively up to the
+ * specified depth.
+ *
+ * @param depth The maximum recursion depth
+ */
+ flat<U>(this:
+ ReadonlyArray<U[][][]> |
+
+ ReadonlyArray<ReadonlyArray<U>[][]> |
+ ReadonlyArray<ReadonlyArray<U[]>[]> |
+ ReadonlyArray<ReadonlyArray<U[][]>> |
+
+ ReadonlyArray<ReadonlyArray<ReadonlyArray<U[]>>> |
+ ReadonlyArray<ReadonlyArray<ReadonlyArray<U>[]>> |
+ ReadonlyArray<ReadonlyArray<ReadonlyArray<U>>[]> |
+
+ ReadonlyArray<ReadonlyArray<ReadonlyArray<ReadonlyArray<U>>>>,
+ depth: 3): U[];
+
+ /**
+ * Returns a new array with all sub-array elements concatenated into it recursively up to the
+ * specified depth.
+ *
+ * @param depth The maximum recursion depth
+ */
+ flat<U>(this:
+ ReadonlyArray<U[][]> |
+
+ ReadonlyArray<ReadonlyArray<U[]>> |
+ ReadonlyArray<ReadonlyArray<U>[]> |
+
+ ReadonlyArray<ReadonlyArray<ReadonlyArray<U>>>,
+ depth: 2): U[];
+
+ /**
+ * Returns a new array with all sub-array elements concatenated into it recursively up to the
+ * specified depth.
+ *
+ * @param depth The maximum recursion depth
+ */
+ flat<U>(this:
+ ReadonlyArray<U[]> |
+ ReadonlyArray<ReadonlyArray<U>>,
+ depth?: 1
+ ): U[];
+
+ /**
+ * Returns a new array with all sub-array elements concatenated into it recursively up to the
+ * specified depth.
+ *
+ * @param depth The maximum recursion depth
+ */
+ flat<U>(this:
+ ReadonlyArray<U>,
+ depth: 0
+ ): U[];
+
+ /**
+ * Returns a new array with all sub-array elements concatenated into it recursively up to the
+ * specified depth. If no depth is provided, flat method defaults to the depth of 1.
+ *
+ * @param depth The maximum recursion depth
+ */
+ flat<U>(depth?: number): any[];
+ }
+
+interface Array<T> {
+
+ /**
+ * Calls a defined callback function on each element of an array. Then, flattens the result into
+ * a new array.
+ * This is identical to a map followed by flat with depth 1.
+ *
+ * @param callback A function that accepts up to three arguments. The flatMap method calls the
+ * callback function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callback function. If
+ * thisArg is omitted, undefined is used as the this value.
+ */
+ flatMap<U, This = undefined> (
+ callback: (this: This, value: T, index: number, array: T[]) => U|ReadonlyArray<U>,
+ thisArg?: This
+ ): U[]
+
+ /**
+ * Returns a new array with all sub-array elements concatenated into it recursively up to the
+ * specified depth.
+ *
+ * @param depth The maximum recursion depth
+ */
+ flat<U>(this: U[][][][][][][][], depth: 7): U[];
+
+ /**
+ * Returns a new array with all sub-array elements concatenated into it recursively up to the
+ * specified depth.
+ *
+ * @param depth The maximum recursion depth
+ */
+ flat<U>(this: U[][][][][][][], depth: 6): U[];
+
+ /**
+ * Returns a new array with all sub-array elements concatenated into it recursively up to the
+ * specified depth.
+ *
+ * @param depth The maximum recursion depth
+ */
+ flat<U>(this: U[][][][][][], depth: 5): U[];
+
+ /**
+ * Returns a new array with all sub-array elements concatenated into it recursively up to the
+ * specified depth.
+ *
+ * @param depth The maximum recursion depth
+ */
+ flat<U>(this: U[][][][][], depth: 4): U[];
+
+ /**
+ * Returns a new array with all sub-array elements concatenated into it recursively up to the
+ * specified depth.
+ *
+ * @param depth The maximum recursion depth
+ */
+ flat<U>(this: U[][][][], depth: 3): U[];
+
+ /**
+ * Returns a new array with all sub-array elements concatenated into it recursively up to the
+ * specified depth.
+ *
+ * @param depth The maximum recursion depth
+ */
+ flat<U>(this: U[][][], depth: 2): U[];
+
+ /**
+ * Returns a new array with all sub-array elements concatenated into it recursively up to the
+ * specified depth.
+ *
+ * @param depth The maximum recursion depth
+ */
+ flat<U>(this: U[][], depth?: 1): U[];
+
+ /**
+ * Returns a new array with all sub-array elements concatenated into it recursively up to the
+ * specified depth.
+ *
+ * @param depth The maximum recursion depth
+ */
+ flat<U>(this: U[], depth: 0): U[];
+
+ /**
+ * Returns a new array with all sub-array elements concatenated into it recursively up to the
+ * specified depth. If no depth is provided, flat method defaults to the depth of 1.
+ *
+ * @param depth The maximum recursion depth
+ */
+ flat<U>(depth?: number): any[];
+}
diff --git a/cli/dts/lib.esnext.asynciterable.d.ts b/cli/dts/lib.esnext.asynciterable.d.ts
new file mode 100644
index 000000000..38e12a7ca
--- /dev/null
+++ b/cli/dts/lib.esnext.asynciterable.d.ts
@@ -0,0 +1,44 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2015.symbol" />
+/// <reference lib="es2015.iterable" />
+
+interface SymbolConstructor {
+ /**
+ * A method that returns the default async iterator for an object. Called by the semantics of
+ * the for-await-of statement.
+ */
+ readonly asyncIterator: symbol;
+}
+
+interface AsyncIterator<T> {
+ next(value?: any): Promise<IteratorResult<T>>;
+ return?(value?: any): Promise<IteratorResult<T>>;
+ throw?(e?: any): Promise<IteratorResult<T>>;
+}
+
+interface AsyncIterable<T> {
+ [Symbol.asyncIterator](): AsyncIterator<T>;
+}
+
+interface AsyncIterableIterator<T> extends AsyncIterator<T> {
+ [Symbol.asyncIterator](): AsyncIterableIterator<T>;
+} \ No newline at end of file
diff --git a/cli/dts/lib.esnext.bigint.d.ts b/cli/dts/lib.esnext.bigint.d.ts
new file mode 100644
index 000000000..50967de98
--- /dev/null
+++ b/cli/dts/lib.esnext.bigint.d.ts
@@ -0,0 +1,629 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+interface BigInt {
+ /**
+ * Returns a string representation of an object.
+ * @param radix Specifies a radix for converting numeric values to strings.
+ */
+ toString(radix?: number): string;
+
+ /** Returns a string representation appropriate to the host environment's current locale. */
+ toLocaleString(): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): bigint;
+
+ readonly [Symbol.toStringTag]: "BigInt";
+}
+
+interface BigIntConstructor {
+ (value?: any): bigint;
+ readonly prototype: BigInt;
+
+ /**
+ * Interprets the low bits of a BigInt as a 2's-complement signed integer.
+ * All higher bits are discarded.
+ * @param bits The number of low bits to use
+ * @param int The BigInt whose bits to extract
+ */
+ asIntN(bits: number, int: bigint): bigint;
+ /**
+ * Interprets the low bits of a BigInt as an unsigned integer.
+ * All higher bits are discarded.
+ * @param bits The number of low bits to use
+ * @param int The BigInt whose bits to extract
+ */
+ asUintN(bits: number, int: bigint): bigint;
+}
+
+declare var BigInt: BigIntConstructor;
+
+/**
+ * A typed array of 64-bit signed integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated, an exception is raised.
+ */
+interface BigInt64Array {
+ /** The size in bytes of each element in the array. */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /** The ArrayBuffer instance referenced by the array. */
+ readonly buffer: ArrayBufferLike;
+
+ /** The length in bytes of the array. */
+ readonly byteLength: number;
+
+ /** The offset in bytes of the array. */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /** Yields index, value pairs for every entry in the array. */
+ entries(): IterableIterator<[number, bigint]>;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in the array until the callbackfn returns false,
+ * or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: bigint, start?: number, end?: number): this;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (value: bigint, index: number, array: BigInt64Array) => any, thisArg?: any): BigInt64Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): bigint | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (value: bigint, index: number, array: BigInt64Array) => void, thisArg?: any): void;
+
+ /**
+ * Determines whether an array includes a certain element, returning true or false as appropriate.
+ * @param searchElement The element to search for.
+ * @param fromIndex The position in this array at which to begin searching for searchElement.
+ */
+ includes(searchElement: bigint, fromIndex?: number): boolean;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: bigint, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /** Yields each index in the array. */
+ keys(): IterableIterator<number>;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: bigint, fromIndex?: number): number;
+
+ /** The length of the array. */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (value: bigint, index: number, array: BigInt64Array) => bigint, thisArg?: any): BigInt64Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint): bigint;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint): bigint;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array) => U, initialValue: U): U;
+
+ /** Reverses the elements in the array. */
+ reverse(): this;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<bigint>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): BigInt64Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in the array until the callbackfn returns true, or until
+ * the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): boolean;
+
+ /**
+ * Sorts the array.
+ * @param compareFn The function used to determine the order of the elements. If omitted, the elements are sorted in ascending order.
+ */
+ sort(compareFn?: (a: bigint, b: bigint) => number | bigint): this;
+
+ /**
+ * Gets a new BigInt64Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin: number, end?: number): BigInt64Array;
+
+ /** Converts the array to a string by using the current locale. */
+ toLocaleString(): string;
+
+ /** Returns a string representation of the array. */
+ toString(): string;
+
+ /** Yields each value in the array. */
+ values(): IterableIterator<bigint>;
+
+ [Symbol.iterator](): IterableIterator<bigint>;
+
+ readonly [Symbol.toStringTag]: "BigInt64Array";
+
+ [index: number]: bigint;
+}
+
+interface BigInt64ArrayConstructor {
+ readonly prototype: BigInt64Array;
+ new(length?: number): BigInt64Array;
+ new(array: Iterable<bigint>): BigInt64Array;
+ new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigInt64Array;
+
+ /** The size in bytes of each element in the array. */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: bigint[]): BigInt64Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: ArrayLike<bigint>): BigInt64Array;
+ from<U>(arrayLike: ArrayLike<U>, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigInt64Array;
+}
+
+declare var BigInt64Array: BigInt64ArrayConstructor;
+
+/**
+ * A typed array of 64-bit unsigned integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated, an exception is raised.
+ */
+interface BigUint64Array {
+ /** The size in bytes of each element in the array. */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /** The ArrayBuffer instance referenced by the array. */
+ readonly buffer: ArrayBufferLike;
+
+ /** The length in bytes of the array. */
+ readonly byteLength: number;
+
+ /** The offset in bytes of the array. */
+ readonly byteOffset: number;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+
+ /** Yields index, value pairs for every entry in the array. */
+ entries(): IterableIterator<[number, bigint]>;
+
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in the array until the callbackfn returns false,
+ * or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): boolean;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: bigint, start?: number, end?: number): this;
+
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (value: bigint, index: number, array: BigUint64Array) => any, thisArg?: any): BigUint64Array;
+
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): bigint | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and -1
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): number;
+
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (value: bigint, index: number, array: BigUint64Array) => void, thisArg?: any): void;
+
+ /**
+ * Determines whether an array includes a certain element, returning true or false as appropriate.
+ * @param searchElement The element to search for.
+ * @param fromIndex The position in this array at which to begin searching for searchElement.
+ */
+ includes(searchElement: bigint, fromIndex?: number): boolean;
+
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ indexOf(searchElement: bigint, fromIndex?: number): number;
+
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the
+ * resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+
+ /** Yields each index in the array. */
+ keys(): IterableIterator<number>;
+
+ /**
+ * Returns the index of the last occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * search starts at index 0.
+ */
+ lastIndexOf(searchElement: bigint, fromIndex?: number): number;
+
+ /** The length of the array. */
+ readonly length: number;
+
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that
+ * contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ map(callbackfn: (value: bigint, index: number, array: BigUint64Array) => bigint, thisArg?: any): BigUint64Array;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint): bigint;
+
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
+ * call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigUint64Array) => U, initialValue: U): U;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
+ * argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint): bigint;
+
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
+ * argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigUint64Array) => U, initialValue: U): U;
+
+ /** Reverses the elements in the array. */
+ reverse(): this;
+
+ /**
+ * Sets a value or an array of values.
+ * @param array A typed or untyped array of values to set.
+ * @param offset The index in the current array at which the values are to be written.
+ */
+ set(array: ArrayLike<bigint>, offset?: number): void;
+
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): BigUint64Array;
+
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in the array until the callbackfn returns true, or until
+ * the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): boolean;
+
+ /**
+ * Sorts the array.
+ * @param compareFn The function used to determine the order of the elements. If omitted, the elements are sorted in ascending order.
+ */
+ sort(compareFn?: (a: bigint, b: bigint) => number | bigint): this;
+
+ /**
+ * Gets a new BigUint64Array view of the ArrayBuffer store for this array, referencing the elements
+ * at begin, inclusive, up to end, exclusive.
+ * @param begin The index of the beginning of the array.
+ * @param end The index of the end of the array.
+ */
+ subarray(begin: number, end?: number): BigUint64Array;
+
+ /** Converts the array to a string by using the current locale. */
+ toLocaleString(): string;
+
+ /** Returns a string representation of the array. */
+ toString(): string;
+
+ /** Yields each value in the array. */
+ values(): IterableIterator<bigint>;
+
+ [Symbol.iterator](): IterableIterator<bigint>;
+
+ readonly [Symbol.toStringTag]: "BigUint64Array";
+
+ [index: number]: bigint;
+}
+
+interface BigUint64ArrayConstructor {
+ readonly prototype: BigUint64Array;
+ new(length?: number): BigUint64Array;
+ new(array: Iterable<bigint>): BigUint64Array;
+ new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigUint64Array;
+
+ /** The size in bytes of each element in the array. */
+ readonly BYTES_PER_ELEMENT: number;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of(...items: bigint[]): BigUint64Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: ArrayLike<bigint>): BigUint64Array;
+ from<U>(arrayLike: ArrayLike<U>, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigUint64Array;
+}
+
+declare var BigUint64Array: BigUint64ArrayConstructor;
+
+interface DataView {
+ /**
+ * Gets the BigInt64 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getBigInt64(byteOffset: number, littleEndian?: boolean): bigint;
+
+ /**
+ * Gets the BigUint64 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
+ * @param byteOffset The place in the buffer at which the value should be retrieved.
+ */
+ getBigUint64(byteOffset: number, littleEndian?: boolean): bigint;
+
+ /**
+ * Stores a BigInt64 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ * @param littleEndian If false or undefined, a big-endian value should be written,
+ * otherwise a little-endian value should be written.
+ */
+ setBigInt64(byteOffset: number, value: bigint, littleEndian?: boolean): void;
+
+ /**
+ * Stores a BigUint64 value at the specified byte offset from the start of the view.
+ * @param byteOffset The place in the buffer at which the value should be set.
+ * @param value The value to set.
+ * @param littleEndian If false or undefined, a big-endian value should be written,
+ * otherwise a little-endian value should be written.
+ */
+ setBigUint64(byteOffset: number, value: bigint, littleEndian?: boolean): void;
+}
diff --git a/cli/dts/lib.esnext.d.ts b/cli/dts/lib.esnext.d.ts
new file mode 100644
index 000000000..c03ea0b11
--- /dev/null
+++ b/cli/dts/lib.esnext.d.ts
@@ -0,0 +1,24 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="es2020" />
+/// <reference lib="esnext.intl" />
+/// <reference lib="esnext.string" />
+/// <reference lib="esnext.promise" />
diff --git a/cli/dts/lib.esnext.full.d.ts b/cli/dts/lib.esnext.full.d.ts
new file mode 100644
index 000000000..be12ba8e4
--- /dev/null
+++ b/cli/dts/lib.esnext.full.d.ts
@@ -0,0 +1,25 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/// <reference lib="esnext" />
+/// <reference lib="dom" />
+/// <reference lib="webworker.importscripts" />
+/// <reference lib="scripthost" />
+/// <reference lib="dom.iterable" /> \ No newline at end of file
diff --git a/cli/dts/lib.esnext.intl.d.ts b/cli/dts/lib.esnext.intl.d.ts
new file mode 100644
index 000000000..c0cf2ba80
--- /dev/null
+++ b/cli/dts/lib.esnext.intl.d.ts
@@ -0,0 +1,32 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+declare namespace Intl {
+ type NumberFormatPartTypes = "currency" | "decimal" | "fraction" | "group" | "infinity" | "integer" | "literal" | "minusSign" | "nan" | "plusSign" | "percentSign";
+
+ interface NumberFormatPart {
+ type: NumberFormatPartTypes;
+ value: string;
+ }
+
+ interface NumberFormat {
+ formatToParts(number?: number): NumberFormatPart[];
+ }
+}
diff --git a/cli/dts/lib.esnext.promise.d.ts b/cli/dts/lib.esnext.promise.d.ts
new file mode 100644
index 000000000..6a56c5512
--- /dev/null
+++ b/cli/dts/lib.esnext.promise.d.ts
@@ -0,0 +1,43 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+interface AggregateError extends Error {
+ errors: any[]
+}
+
+interface AggregateErrorConstructor {
+ new(errors: Iterable<any>, message?: string): AggregateError;
+ (errors: Iterable<any>, message?: string): AggregateError;
+ readonly prototype: AggregateError;
+}
+
+declare var AggregateError: AggregateErrorConstructor;
+
+/**
+ * Represents the completion of an asynchronous operation
+ */
+interface PromiseConstructor {
+ /**
+ * The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm.
+ * @param values An array or iterable of Promises.
+ * @returns A new Promise.
+ */
+ any<T>(values: (T | PromiseLike<T>)[] | Iterable<T | PromiseLike<T>>): Promise<T>
+}
diff --git a/cli/dts/lib.esnext.string.d.ts b/cli/dts/lib.esnext.string.d.ts
new file mode 100644
index 000000000..89b27e2fe
--- /dev/null
+++ b/cli/dts/lib.esnext.string.d.ts
@@ -0,0 +1,35 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+interface String {
+ /**
+ * Replace all instances of a substring in a string, using a regular expression or search string.
+ * @param searchValue A string to search for.
+ * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
+ */
+ replaceAll(searchValue: string | RegExp, replaceValue: string): string;
+
+ /**
+ * Replace all instances of a substring in a string, using a regular expression or search string.
+ * @param searchValue A string to search for.
+ * @param replacer A function that returns the replacement text.
+ */
+ replaceAll(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;
+}
diff --git a/cli/dts/lib.esnext.symbol.d.ts b/cli/dts/lib.esnext.symbol.d.ts
new file mode 100644
index 000000000..98293eaf5
--- /dev/null
+++ b/cli/dts/lib.esnext.symbol.d.ts
@@ -0,0 +1,26 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+interface Symbol {
+ /**
+ * expose the [[Description]] internal slot of a symbol directly
+ */
+ readonly description: string;
+}
diff --git a/cli/dts/lib.scripthost.d.ts b/cli/dts/lib.scripthost.d.ts
new file mode 100644
index 000000000..8ac760bab
--- /dev/null
+++ b/cli/dts/lib.scripthost.d.ts
@@ -0,0 +1,327 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+
+
+/////////////////////////////
+/// Windows Script Host APIS
+/////////////////////////////
+
+
+interface ActiveXObject {
+ new (s: string): any;
+}
+declare var ActiveXObject: ActiveXObject;
+
+interface ITextWriter {
+ Write(s: string): void;
+ WriteLine(s: string): void;
+ Close(): void;
+}
+
+interface TextStreamBase {
+ /**
+ * The column number of the current character position in an input stream.
+ */
+ Column: number;
+
+ /**
+ * The current line number in an input stream.
+ */
+ Line: number;
+
+ /**
+ * Closes a text stream.
+ * It is not necessary to close standard streams; they close automatically when the process ends. If
+ * you close a standard stream, be aware that any other pointers to that standard stream become invalid.
+ */
+ Close(): void;
+}
+
+interface TextStreamWriter extends TextStreamBase {
+ /**
+ * Sends a string to an output stream.
+ */
+ Write(s: string): void;
+
+ /**
+ * Sends a specified number of blank lines (newline characters) to an output stream.
+ */
+ WriteBlankLines(intLines: number): void;
+
+ /**
+ * Sends a string followed by a newline character to an output stream.
+ */
+ WriteLine(s: string): void;
+}
+
+interface TextStreamReader extends TextStreamBase {
+ /**
+ * Returns a specified number of characters from an input stream, starting at the current pointer position.
+ * Does not return until the ENTER key is pressed.
+ * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
+ */
+ Read(characters: number): string;
+
+ /**
+ * Returns all characters from an input stream.
+ * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
+ */
+ ReadAll(): string;
+
+ /**
+ * Returns an entire line from an input stream.
+ * Although this method extracts the newline character, it does not add it to the returned string.
+ * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
+ */
+ ReadLine(): string;
+
+ /**
+ * Skips a specified number of characters when reading from an input text stream.
+ * Can only be used on a stream in reading mode; causes an error in writing or appending mode.
+ * @param characters Positive number of characters to skip forward. (Backward skipping is not supported.)
+ */
+ Skip(characters: number): void;
+
+ /**
+ * Skips the next line when reading from an input text stream.
+ * Can only be used on a stream in reading mode, not writing or appending mode.
+ */
+ SkipLine(): void;
+
+ /**
+ * Indicates whether the stream pointer position is at the end of a line.
+ */
+ AtEndOfLine: boolean;
+
+ /**
+ * Indicates whether the stream pointer position is at the end of a stream.
+ */
+ AtEndOfStream: boolean;
+}
+
+declare var WScript: {
+ /**
+ * Outputs text to either a message box (under WScript.exe) or the command console window followed by
+ * a newline (under CScript.exe).
+ */
+ Echo(s: any): void;
+
+ /**
+ * Exposes the write-only error output stream for the current script.
+ * Can be accessed only while using CScript.exe.
+ */
+ StdErr: TextStreamWriter;
+
+ /**
+ * Exposes the write-only output stream for the current script.
+ * Can be accessed only while using CScript.exe.
+ */
+ StdOut: TextStreamWriter;
+ Arguments: { length: number; Item(n: number): string; };
+
+ /**
+ * The full path of the currently running script.
+ */
+ ScriptFullName: string;
+
+ /**
+ * Forces the script to stop immediately, with an optional exit code.
+ */
+ Quit(exitCode?: number): number;
+
+ /**
+ * The Windows Script Host build version number.
+ */
+ BuildVersion: number;
+
+ /**
+ * Fully qualified path of the host executable.
+ */
+ FullName: string;
+
+ /**
+ * Gets/sets the script mode - interactive(true) or batch(false).
+ */
+ Interactive: boolean;
+
+ /**
+ * The name of the host executable (WScript.exe or CScript.exe).
+ */
+ Name: string;
+
+ /**
+ * Path of the directory containing the host executable.
+ */
+ Path: string;
+
+ /**
+ * The filename of the currently running script.
+ */
+ ScriptName: string;
+
+ /**
+ * Exposes the read-only input stream for the current script.
+ * Can be accessed only while using CScript.exe.
+ */
+ StdIn: TextStreamReader;
+
+ /**
+ * Windows Script Host version
+ */
+ Version: string;
+
+ /**
+ * Connects a COM object's event sources to functions named with a given prefix, in the form prefix_event.
+ */
+ ConnectObject(objEventSource: any, strPrefix: string): void;
+
+ /**
+ * Creates a COM object.
+ * @param strProgiID
+ * @param strPrefix Function names in the form prefix_event will be bound to this object's COM events.
+ */
+ CreateObject(strProgID: string, strPrefix?: string): any;
+
+ /**
+ * Disconnects a COM object from its event sources.
+ */
+ DisconnectObject(obj: any): void;
+
+ /**
+ * Retrieves an existing object with the specified ProgID from memory, or creates a new one from a file.
+ * @param strPathname Fully qualified path to the file containing the object persisted to disk.
+ * For objects in memory, pass a zero-length string.
+ * @param strProgID
+ * @param strPrefix Function names in the form prefix_event will be bound to this object's COM events.
+ */
+ GetObject(strPathname: string, strProgID?: string, strPrefix?: string): any;
+
+ /**
+ * Suspends script execution for a specified length of time, then continues execution.
+ * @param intTime Interval (in milliseconds) to suspend script execution.
+ */
+ Sleep(intTime: number): void;
+};
+
+/**
+ * WSH is an alias for WScript under Windows Script Host
+ */
+declare var WSH: typeof WScript;
+
+/**
+ * Represents an Automation SAFEARRAY
+ */
+declare class SafeArray<T = any> {
+ private constructor();
+ private SafeArray_typekey: SafeArray<T>;
+}
+
+/**
+ * Allows enumerating over a COM collection, which may not have indexed item access.
+ */
+interface Enumerator<T = any> {
+ /**
+ * Returns true if the current item is the last one in the collection, or the collection is empty,
+ * or the current item is undefined.
+ */
+ atEnd(): boolean;
+
+ /**
+ * Returns the current item in the collection
+ */
+ item(): T;
+
+ /**
+ * Resets the current item in the collection to the first item. If there are no items in the collection,
+ * the current item is set to undefined.
+ */
+ moveFirst(): void;
+
+ /**
+ * Moves the current item to the next item in the collection. If the enumerator is at the end of
+ * the collection or the collection is empty, the current item is set to undefined.
+ */
+ moveNext(): void;
+}
+
+interface EnumeratorConstructor {
+ new <T = any>(safearray: SafeArray<T>): Enumerator<T>;
+ new <T = any>(collection: { Item(index: any): T }): Enumerator<T>;
+ new <T = any>(collection: any): Enumerator<T>;
+}
+
+declare var Enumerator: EnumeratorConstructor;
+
+/**
+ * Enables reading from a COM safe array, which might have an alternate lower bound, or multiple dimensions.
+ */
+interface VBArray<T = any> {
+ /**
+ * Returns the number of dimensions (1-based).
+ */
+ dimensions(): number;
+
+ /**
+ * Takes an index for each dimension in the array, and returns the item at the corresponding location.
+ */
+ getItem(dimension1Index: number, ...dimensionNIndexes: number[]): T;
+
+ /**
+ * Returns the smallest available index for a given dimension.
+ * @param dimension 1-based dimension (defaults to 1)
+ */
+ lbound(dimension?: number): number;
+
+ /**
+ * Returns the largest available index for a given dimension.
+ * @param dimension 1-based dimension (defaults to 1)
+ */
+ ubound(dimension?: number): number;
+
+ /**
+ * Returns a Javascript array with all the elements in the VBArray. If there are multiple dimensions,
+ * each successive dimension is appended to the end of the array.
+ * Example: [[1,2,3],[4,5,6]] becomes [1,2,3,4,5,6]
+ */
+ toArray(): T[];
+}
+
+interface VBArrayConstructor {
+ new <T = any>(safeArray: SafeArray<T>): VBArray<T>;
+}
+
+declare var VBArray: VBArrayConstructor;
+
+/**
+ * Automation date (VT_DATE)
+ */
+declare class VarDate {
+ private constructor();
+ private VarDate_typekey: VarDate;
+}
+
+interface DateConstructor {
+ new (vd: VarDate): Date;
+}
+
+interface Date {
+ getVarDate: () => VarDate;
+}
diff --git a/cli/dts/lib.webworker.d.ts b/cli/dts/lib.webworker.d.ts
new file mode 100644
index 000000000..88def7ad3
--- /dev/null
+++ b/cli/dts/lib.webworker.d.ts
@@ -0,0 +1,6027 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+/////////////////////////////
+/// Worker APIs
+/////////////////////////////
+
+interface AddEventListenerOptions extends EventListenerOptions {
+ once?: boolean;
+ passive?: boolean;
+}
+
+interface AesCbcParams extends Algorithm {
+ iv: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer;
+}
+
+interface AesCtrParams extends Algorithm {
+ counter: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer;
+ length: number;
+}
+
+interface AesDerivedKeyParams extends Algorithm {
+ length: number;
+}
+
+interface AesGcmParams extends Algorithm {
+ additionalData?: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer;
+ iv: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer;
+ tagLength?: number;
+}
+
+interface AesKeyAlgorithm extends KeyAlgorithm {
+ length: number;
+}
+
+interface AesKeyGenParams extends Algorithm {
+ length: number;
+}
+
+interface Algorithm {
+ name: string;
+}
+
+interface BlobPropertyBag {
+ endings?: EndingType;
+ type?: string;
+}
+
+interface CacheQueryOptions {
+ ignoreMethod?: boolean;
+ ignoreSearch?: boolean;
+ ignoreVary?: boolean;
+}
+
+interface CanvasRenderingContext2DSettings {
+ alpha?: boolean;
+ desynchronized?: boolean;
+}
+
+interface ClientQueryOptions {
+ includeUncontrolled?: boolean;
+ type?: ClientTypes;
+}
+
+interface CloseEventInit extends EventInit {
+ code?: number;
+ reason?: string;
+ wasClean?: boolean;
+}
+
+interface CryptoKeyPair {
+ privateKey?: CryptoKey;
+ publicKey?: CryptoKey;
+}
+
+interface CustomEventInit<T = any> extends EventInit {
+ detail?: T;
+}
+
+interface DOMMatrix2DInit {
+ a?: number;
+ b?: number;
+ c?: number;
+ d?: number;
+ e?: number;
+ f?: number;
+ m11?: number;
+ m12?: number;
+ m21?: number;
+ m22?: number;
+ m41?: number;
+ m42?: number;
+}
+
+interface DOMMatrixInit extends DOMMatrix2DInit {
+ is2D?: boolean;
+ m13?: number;
+ m14?: number;
+ m23?: number;
+ m24?: number;
+ m31?: number;
+ m32?: number;
+ m33?: number;
+ m34?: number;
+ m43?: number;
+ m44?: number;
+}
+
+interface DOMPointInit {
+ w?: number;
+ x?: number;
+ y?: number;
+ z?: number;
+}
+
+interface DOMQuadInit {
+ p1?: DOMPointInit;
+ p2?: DOMPointInit;
+ p3?: DOMPointInit;
+ p4?: DOMPointInit;
+}
+
+interface DOMRectInit {
+ height?: number;
+ width?: number;
+ x?: number;
+ y?: number;
+}
+
+interface DevicePermissionDescriptor extends PermissionDescriptor {
+ deviceId?: string;
+ name: "camera" | "microphone" | "speaker";
+}
+
+interface EcKeyGenParams extends Algorithm {
+ namedCurve: NamedCurve;
+}
+
+interface EcKeyImportParams extends Algorithm {
+ namedCurve: NamedCurve;
+}
+
+interface EcdhKeyDeriveParams extends Algorithm {
+ public: CryptoKey;
+}
+
+interface EcdsaParams extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+}
+
+interface ErrorEventInit extends EventInit {
+ colno?: number;
+ error?: any;
+ filename?: string;
+ lineno?: number;
+ message?: string;
+}
+
+interface EventInit {
+ bubbles?: boolean;
+ cancelable?: boolean;
+ composed?: boolean;
+}
+
+interface EventListenerOptions {
+ capture?: boolean;
+}
+
+interface EventSourceInit {
+ withCredentials?: boolean;
+}
+
+interface ExtendableEventInit extends EventInit {
+}
+
+interface ExtendableMessageEventInit extends ExtendableEventInit {
+ data?: any;
+ lastEventId?: string;
+ origin?: string;
+ ports?: MessagePort[];
+ source?: Client | ServiceWorker | MessagePort | null;
+}
+
+interface FetchEventInit extends ExtendableEventInit {
+ clientId?: string;
+ preloadResponse?: Promise<any>;
+ replacesClientId?: string;
+ request: Request;
+ resultingClientId?: string;
+}
+
+interface FilePropertyBag extends BlobPropertyBag {
+ lastModified?: number;
+}
+
+interface GetNotificationOptions {
+ tag?: string;
+}
+
+interface HmacImportParams extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+ length?: number;
+}
+
+interface HmacKeyGenParams extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+ length?: number;
+}
+
+interface IDBIndexParameters {
+ multiEntry?: boolean;
+ unique?: boolean;
+}
+
+interface IDBObjectStoreParameters {
+ autoIncrement?: boolean;
+ keyPath?: string | string[] | null;
+}
+
+interface IDBVersionChangeEventInit extends EventInit {
+ newVersion?: number | null;
+ oldVersion?: number;
+}
+
+interface ImageBitmapOptions {
+ colorSpaceConversion?: ColorSpaceConversion;
+ imageOrientation?: ImageOrientation;
+ premultiplyAlpha?: PremultiplyAlpha;
+ resizeHeight?: number;
+ resizeQuality?: ResizeQuality;
+ resizeWidth?: number;
+}
+
+interface ImageBitmapRenderingContextSettings {
+ alpha?: boolean;
+}
+
+interface ImageEncodeOptions {
+ quality?: number;
+ type?: string;
+}
+
+interface JsonWebKey {
+ alg?: string;
+ crv?: string;
+ d?: string;
+ dp?: string;
+ dq?: string;
+ e?: string;
+ ext?: boolean;
+ k?: string;
+ key_ops?: string[];
+ kty?: string;
+ n?: string;
+ oth?: RsaOtherPrimesInfo[];
+ p?: string;
+ q?: string;
+ qi?: string;
+ use?: string;
+ x?: string;
+ y?: string;
+}
+
+interface KeyAlgorithm {
+ name: string;
+}
+
+interface MessageEventInit extends EventInit {
+ data?: any;
+ lastEventId?: string;
+ origin?: string;
+ ports?: MessagePort[];
+ source?: MessageEventSource | null;
+}
+
+interface MidiPermissionDescriptor extends PermissionDescriptor {
+ name: "midi";
+ sysex?: boolean;
+}
+
+interface MultiCacheQueryOptions extends CacheQueryOptions {
+ cacheName?: string;
+}
+
+interface NavigationPreloadState {
+ enabled?: boolean;
+ headerValue?: string;
+}
+
+interface NotificationAction {
+ action: string;
+ icon?: string;
+ title: string;
+}
+
+interface NotificationEventInit extends ExtendableEventInit {
+ action?: string;
+ notification: Notification;
+}
+
+interface NotificationOptions {
+ actions?: NotificationAction[];
+ badge?: string;
+ body?: string;
+ data?: any;
+ dir?: NotificationDirection;
+ icon?: string;
+ image?: string;
+ lang?: string;
+ renotify?: boolean;
+ requireInteraction?: boolean;
+ silent?: boolean;
+ tag?: string;
+ timestamp?: number;
+ vibrate?: VibratePattern;
+}
+
+interface Pbkdf2Params extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+ iterations: number;
+ salt: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer;
+}
+
+interface PerformanceObserverInit {
+ buffered?: boolean;
+ entryTypes?: string[];
+ type?: string;
+}
+
+interface PermissionDescriptor {
+ name: PermissionName;
+}
+
+interface PipeOptions {
+ preventAbort?: boolean;
+ preventCancel?: boolean;
+ preventClose?: boolean;
+ signal?: AbortSignal;
+}
+
+interface PostMessageOptions {
+ transfer?: any[];
+}
+
+interface ProgressEventInit extends EventInit {
+ lengthComputable?: boolean;
+ loaded?: number;
+ total?: number;
+}
+
+interface PromiseRejectionEventInit extends EventInit {
+ promise: Promise<any>;
+ reason?: any;
+}
+
+interface PushEventInit extends ExtendableEventInit {
+ data?: PushMessageDataInit;
+}
+
+interface PushPermissionDescriptor extends PermissionDescriptor {
+ name: "push";
+ userVisibleOnly?: boolean;
+}
+
+interface PushSubscriptionChangeEventInit extends ExtendableEventInit {
+ newSubscription?: PushSubscription;
+ oldSubscription?: PushSubscription;
+}
+
+interface PushSubscriptionJSON {
+ endpoint?: string;
+ expirationTime?: number | null;
+ keys?: Record<string, string>;
+}
+
+interface PushSubscriptionOptionsInit {
+ applicationServerKey?: BufferSource | string | null;
+ userVisibleOnly?: boolean;
+}
+
+interface QueuingStrategy<T = any> {
+ highWaterMark?: number;
+ size?: QueuingStrategySizeCallback<T>;
+}
+
+interface ReadableStreamReadDoneResult<T> {
+ done: true;
+ value?: T;
+}
+
+interface ReadableStreamReadValueResult<T> {
+ done: false;
+ value: T;
+}
+
+interface RegistrationOptions {
+ scope?: string;
+ type?: WorkerType;
+ updateViaCache?: ServiceWorkerUpdateViaCache;
+}
+
+interface RequestInit {
+ /**
+ * A BodyInit object or null to set request's body.
+ */
+ body?: BodyInit | null;
+ /**
+ * A string indicating how the request will interact with the browser's cache to set request's cache.
+ */
+ cache?: RequestCache;
+ /**
+ * A string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL. Sets request's credentials.
+ */
+ credentials?: RequestCredentials;
+ /**
+ * A Headers object, an object literal, or an array of two-item arrays to set request's headers.
+ */
+ headers?: HeadersInit;
+ /**
+ * A cryptographic hash of the resource to be fetched by request. Sets request's integrity.
+ */
+ integrity?: string;
+ /**
+ * A boolean to set request's keepalive.
+ */
+ keepalive?: boolean;
+ /**
+ * A string to set request's method.
+ */
+ method?: string;
+ /**
+ * A string to indicate whether the request will use CORS, or will be restricted to same-origin URLs. Sets request's mode.
+ */
+ mode?: RequestMode;
+ /**
+ * A string indicating whether request follows redirects, results in an error upon encountering a redirect, or returns the redirect (in an opaque fashion). Sets request's redirect.
+ */
+ redirect?: RequestRedirect;
+ /**
+ * A string whose value is a same-origin URL, "about:client", or the empty string, to set request's referrer.
+ */
+ referrer?: string;
+ /**
+ * A referrer policy to set request's referrerPolicy.
+ */
+ referrerPolicy?: ReferrerPolicy;
+ /**
+ * An AbortSignal to set request's signal.
+ */
+ signal?: AbortSignal | null;
+ /**
+ * Can only be null. Used to disassociate request from any Window.
+ */
+ window?: any;
+}
+
+interface ResponseInit {
+ headers?: HeadersInit;
+ status?: number;
+ statusText?: string;
+}
+
+interface RsaHashedImportParams extends Algorithm {
+ hash: HashAlgorithmIdentifier;
+}
+
+interface RsaHashedKeyGenParams extends RsaKeyGenParams {
+ hash: HashAlgorithmIdentifier;
+}
+
+interface RsaKeyGenParams extends Algorithm {
+ modulusLength: number;
+ publicExponent: BigInteger;
+}
+
+interface RsaOaepParams extends Algorithm {
+ label?: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer;
+}
+
+interface RsaOtherPrimesInfo {
+ d?: string;
+ r?: string;
+ t?: string;
+}
+
+interface RsaPssParams extends Algorithm {
+ saltLength: number;
+}
+
+interface StorageEstimate {
+ quota?: number;
+ usage?: number;
+}
+
+interface SyncEventInit extends ExtendableEventInit {
+ lastChance?: boolean;
+ tag: string;
+}
+
+interface TextDecodeOptions {
+ stream?: boolean;
+}
+
+interface TextDecoderOptions {
+ fatal?: boolean;
+ ignoreBOM?: boolean;
+}
+
+interface TextEncoderEncodeIntoResult {
+ read?: number;
+ written?: number;
+}
+
+interface Transformer<I = any, O = any> {
+ flush?: TransformStreamDefaultControllerCallback<O>;
+ readableType?: undefined;
+ start?: TransformStreamDefaultControllerCallback<O>;
+ transform?: TransformStreamDefaultControllerTransformCallback<I, O>;
+ writableType?: undefined;
+}
+
+interface UnderlyingByteSource {
+ autoAllocateChunkSize?: number;
+ cancel?: ReadableStreamErrorCallback;
+ pull?: ReadableByteStreamControllerCallback;
+ start?: ReadableByteStreamControllerCallback;
+ type: "bytes";
+}
+
+interface UnderlyingSink<W = any> {
+ abort?: WritableStreamErrorCallback;
+ close?: WritableStreamDefaultControllerCloseCallback;
+ start?: WritableStreamDefaultControllerStartCallback;
+ type?: undefined;
+ write?: WritableStreamDefaultControllerWriteCallback<W>;
+}
+
+interface UnderlyingSource<R = any> {
+ cancel?: ReadableStreamErrorCallback;
+ pull?: ReadableStreamDefaultControllerCallback<R>;
+ start?: ReadableStreamDefaultControllerCallback<R>;
+ type?: undefined;
+}
+
+interface WebGLContextAttributes {
+ alpha?: boolean;
+ antialias?: boolean;
+ depth?: boolean;
+ desynchronized?: boolean;
+ failIfMajorPerformanceCaveat?: boolean;
+ powerPreference?: WebGLPowerPreference;
+ premultipliedAlpha?: boolean;
+ preserveDrawingBuffer?: boolean;
+ stencil?: boolean;
+}
+
+interface WebGLContextEventInit extends EventInit {
+ statusMessage?: string;
+}
+
+interface WorkerOptions {
+ credentials?: RequestCredentials;
+ name?: string;
+ type?: WorkerType;
+}
+
+interface EventListener {
+ (evt: Event): void;
+}
+
+/** The ANGLE_instanced_arrays extension is part of the WebGL API and allows to draw the same object, or groups of similar objects multiple times, if they share the same vertex data, primitive count and type. */
+interface ANGLE_instanced_arrays {
+ drawArraysInstancedANGLE(mode: GLenum, first: GLint, count: GLsizei, primcount: GLsizei): void;
+ drawElementsInstancedANGLE(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr, primcount: GLsizei): void;
+ vertexAttribDivisorANGLE(index: GLuint, divisor: GLuint): void;
+ readonly VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: GLenum;
+}
+
+/** A controller object that allows you to abort one or more DOM requests as and when desired. */
+interface AbortController {
+ /**
+ * Returns the AbortSignal object associated with this object.
+ */
+ readonly signal: AbortSignal;
+ /**
+ * Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted.
+ */
+ abort(): void;
+}
+
+declare var AbortController: {
+ prototype: AbortController;
+ new(): AbortController;
+};
+
+interface AbortSignalEventMap {
+ "abort": Event;
+}
+
+/** A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object. */
+interface AbortSignal extends EventTarget {
+ /**
+ * Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.
+ */
+ readonly aborted: boolean;
+ onabort: ((this: AbortSignal, ev: Event) => any) | null;
+ addEventListener<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var AbortSignal: {
+ prototype: AbortSignal;
+ new(): AbortSignal;
+};
+
+interface AbstractWorkerEventMap {
+ "error": ErrorEvent;
+}
+
+interface AbstractWorker {
+ onerror: ((this: AbstractWorker, ev: ErrorEvent) => any) | null;
+ addEventListener<K extends keyof AbstractWorkerEventMap>(type: K, listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof AbstractWorkerEventMap>(type: K, listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+interface AesCfbParams extends Algorithm {
+ iv: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer;
+}
+
+interface AesCmacParams extends Algorithm {
+ length: number;
+}
+
+interface AnimationFrameProvider {
+ cancelAnimationFrame(handle: number): void;
+ requestAnimationFrame(callback: FrameRequestCallback): number;
+}
+
+/** A file-like object of immutable, raw data. Blobs represent data that isn't necessarily in a JavaScript-native format. The File interface is based on Blob, inheriting blob functionality and expanding it to support files on the user's system. */
+interface Blob {
+ readonly size: number;
+ readonly type: string;
+ arrayBuffer(): Promise<ArrayBuffer>;
+ slice(start?: number, end?: number, contentType?: string): Blob;
+ stream(): ReadableStream;
+ text(): Promise<string>;
+}
+
+declare var Blob: {
+ prototype: Blob;
+ new(blobParts?: BlobPart[], options?: BlobPropertyBag): Blob;
+};
+
+interface Body {
+ readonly body: ReadableStream<Uint8Array> | null;
+ readonly bodyUsed: boolean;
+ arrayBuffer(): Promise<ArrayBuffer>;
+ blob(): Promise<Blob>;
+ formData(): Promise<FormData>;
+ json(): Promise<any>;
+ text(): Promise<string>;
+}
+
+interface BroadcastChannelEventMap {
+ "message": MessageEvent;
+ "messageerror": MessageEvent;
+}
+
+interface BroadcastChannel extends EventTarget {
+ /**
+ * Returns the channel name (as passed to the constructor).
+ */
+ readonly name: string;
+ onmessage: ((this: BroadcastChannel, ev: MessageEvent) => any) | null;
+ onmessageerror: ((this: BroadcastChannel, ev: MessageEvent) => any) | null;
+ /**
+ * Closes the BroadcastChannel object, opening it up to garbage collection.
+ */
+ close(): void;
+ /**
+ * Sends the given message to other BroadcastChannel objects set up for this channel. Messages can be structured objects, e.g. nested objects and arrays.
+ */
+ postMessage(message: any): void;
+ addEventListener<K extends keyof BroadcastChannelEventMap>(type: K, listener: (this: BroadcastChannel, ev: BroadcastChannelEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof BroadcastChannelEventMap>(type: K, listener: (this: BroadcastChannel, ev: BroadcastChannelEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var BroadcastChannel: {
+ prototype: BroadcastChannel;
+ new(name: string): BroadcastChannel;
+};
+
+/** This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams. */
+interface ByteLengthQueuingStrategy extends QueuingStrategy<ArrayBufferView> {
+ highWaterMark: number;
+ size(chunk: ArrayBufferView): number;
+}
+
+declare var ByteLengthQueuingStrategy: {
+ prototype: ByteLengthQueuingStrategy;
+ new(options: { highWaterMark: number }): ByteLengthQueuingStrategy;
+};
+
+/** Provides a storage mechanism for Request / Response object pairs that are cached, for example as part of the ServiceWorker life cycle. Note that the Cache interface is exposed to windowed scopes as well as workers. You don't have to use it in conjunction with service workers, even though it is defined in the service worker spec. */
+interface Cache {
+ add(request: RequestInfo): Promise<void>;
+ addAll(requests: RequestInfo[]): Promise<void>;
+ delete(request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>;
+ keys(request?: RequestInfo, options?: CacheQueryOptions): Promise<ReadonlyArray<Request>>;
+ match(request: RequestInfo, options?: CacheQueryOptions): Promise<Response | undefined>;
+ matchAll(request?: RequestInfo, options?: CacheQueryOptions): Promise<ReadonlyArray<Response>>;
+ put(request: RequestInfo, response: Response): Promise<void>;
+}
+
+declare var Cache: {
+ prototype: Cache;
+ new(): Cache;
+};
+
+/** The storage for Cache objects. */
+interface CacheStorage {
+ delete(cacheName: string): Promise<boolean>;
+ has(cacheName: string): Promise<boolean>;
+ keys(): Promise<string[]>;
+ match(request: RequestInfo, options?: MultiCacheQueryOptions): Promise<Response | undefined>;
+ open(cacheName: string): Promise<Cache>;
+}
+
+declare var CacheStorage: {
+ prototype: CacheStorage;
+ new(): CacheStorage;
+};
+
+interface CanvasCompositing {
+ globalAlpha: number;
+ globalCompositeOperation: string;
+}
+
+interface CanvasDrawImage {
+ drawImage(image: CanvasImageSource, dx: number, dy: number): void;
+ drawImage(image: CanvasImageSource, dx: number, dy: number, dw: number, dh: number): void;
+ drawImage(image: CanvasImageSource, sx: number, sy: number, sw: number, sh: number, dx: number, dy: number, dw: number, dh: number): void;
+}
+
+interface CanvasDrawPath {
+ beginPath(): void;
+ clip(fillRule?: CanvasFillRule): void;
+ clip(path: Path2D, fillRule?: CanvasFillRule): void;
+ fill(fillRule?: CanvasFillRule): void;
+ fill(path: Path2D, fillRule?: CanvasFillRule): void;
+ isPointInPath(x: number, y: number, fillRule?: CanvasFillRule): boolean;
+ isPointInPath(path: Path2D, x: number, y: number, fillRule?: CanvasFillRule): boolean;
+ isPointInStroke(x: number, y: number): boolean;
+ isPointInStroke(path: Path2D, x: number, y: number): boolean;
+ stroke(): void;
+ stroke(path: Path2D): void;
+}
+
+interface CanvasFillStrokeStyles {
+ fillStyle: string | CanvasGradient | CanvasPattern;
+ strokeStyle: string | CanvasGradient | CanvasPattern;
+ createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient;
+ createPattern(image: CanvasImageSource, repetition: string | null): CanvasPattern | null;
+ createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient;
+}
+
+interface CanvasFilters {
+ filter: string;
+}
+
+/** An opaque object describing a gradient. It is returned by the methods CanvasRenderingContext2D.createLinearGradient() or CanvasRenderingContext2D.createRadialGradient(). */
+interface CanvasGradient {
+ /**
+ * Adds a color stop with the given color to the gradient at the given offset. 0.0 is the offset at one end of the gradient, 1.0 is the offset at the other end.
+ *
+ * Throws an "IndexSizeError" DOMException if the offset is out of range. Throws a "SyntaxError" DOMException if the color cannot be parsed.
+ */
+ addColorStop(offset: number, color: string): void;
+}
+
+declare var CanvasGradient: {
+ prototype: CanvasGradient;
+ new(): CanvasGradient;
+};
+
+interface CanvasImageData {
+ createImageData(sw: number, sh: number): ImageData;
+ createImageData(imagedata: ImageData): ImageData;
+ getImageData(sx: number, sy: number, sw: number, sh: number): ImageData;
+ putImageData(imagedata: ImageData, dx: number, dy: number): void;
+ putImageData(imagedata: ImageData, dx: number, dy: number, dirtyX: number, dirtyY: number, dirtyWidth: number, dirtyHeight: number): void;
+}
+
+interface CanvasImageSmoothing {
+ imageSmoothingEnabled: boolean;
+ imageSmoothingQuality: ImageSmoothingQuality;
+}
+
+interface CanvasPath {
+ arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;
+ arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void;
+ bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void;
+ closePath(): void;
+ ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;
+ lineTo(x: number, y: number): void;
+ moveTo(x: number, y: number): void;
+ quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;
+ rect(x: number, y: number, w: number, h: number): void;
+}
+
+interface CanvasPathDrawingStyles {
+ lineCap: CanvasLineCap;
+ lineDashOffset: number;
+ lineJoin: CanvasLineJoin;
+ lineWidth: number;
+ miterLimit: number;
+ getLineDash(): number[];
+ setLineDash(segments: number[]): void;
+}
+
+/** An opaque object describing a pattern, based on an image, a canvas, or a video, created by the CanvasRenderingContext2D.createPattern() method. */
+interface CanvasPattern {
+ /**
+ * Sets the transformation matrix that will be used when rendering the pattern during a fill or stroke painting operation.
+ */
+ setTransform(transform?: DOMMatrix2DInit): void;
+}
+
+declare var CanvasPattern: {
+ prototype: CanvasPattern;
+ new(): CanvasPattern;
+};
+
+interface CanvasRect {
+ clearRect(x: number, y: number, w: number, h: number): void;
+ fillRect(x: number, y: number, w: number, h: number): void;
+ strokeRect(x: number, y: number, w: number, h: number): void;
+}
+
+interface CanvasShadowStyles {
+ shadowBlur: number;
+ shadowColor: string;
+ shadowOffsetX: number;
+ shadowOffsetY: number;
+}
+
+interface CanvasState {
+ restore(): void;
+ save(): void;
+}
+
+interface CanvasText {
+ fillText(text: string, x: number, y: number, maxWidth?: number): void;
+ measureText(text: string): TextMetrics;
+ strokeText(text: string, x: number, y: number, maxWidth?: number): void;
+}
+
+interface CanvasTextDrawingStyles {
+ direction: CanvasDirection;
+ font: string;
+ textAlign: CanvasTextAlign;
+ textBaseline: CanvasTextBaseline;
+}
+
+interface CanvasTransform {
+ getTransform(): DOMMatrix;
+ resetTransform(): void;
+ rotate(angle: number): void;
+ scale(x: number, y: number): void;
+ setTransform(a: number, b: number, c: number, d: number, e: number, f: number): void;
+ setTransform(transform?: DOMMatrix2DInit): void;
+ transform(a: number, b: number, c: number, d: number, e: number, f: number): void;
+ translate(x: number, y: number): void;
+}
+
+/** The Client interface represents an executable context such as a Worker, or a SharedWorker. Window clients are represented by the more-specific WindowClient. You can get Client/WindowClient objects from methods such as Clients.matchAll() and Clients.get(). */
+interface Client {
+ readonly frameType: FrameType;
+ readonly id: string;
+ readonly type: ClientTypes;
+ readonly url: string;
+ postMessage(message: any, transfer?: Transferable[]): void;
+}
+
+declare var Client: {
+ prototype: Client;
+ new(): Client;
+};
+
+/** Provides access to Client objects. Access it via self.clients within a service worker. */
+interface Clients {
+ claim(): Promise<void>;
+ get(id: string): Promise<any>;
+ matchAll(options?: ClientQueryOptions): Promise<ReadonlyArray<Client>>;
+ openWindow(url: string): Promise<WindowClient | null>;
+}
+
+declare var Clients: {
+ prototype: Clients;
+ new(): Clients;
+};
+
+/** A CloseEvent is sent to clients using WebSockets when the connection is closed. This is delivered to the listener indicated by the WebSocket object's onclose attribute. */
+interface CloseEvent extends Event {
+ /**
+ * Returns the WebSocket connection close code provided by the server.
+ */
+ readonly code: number;
+ /**
+ * Returns the WebSocket connection close reason provided by the server.
+ */
+ readonly reason: string;
+ /**
+ * Returns true if the connection closed cleanly; false otherwise.
+ */
+ readonly wasClean: boolean;
+}
+
+declare var CloseEvent: {
+ prototype: CloseEvent;
+ new(type: string, eventInitDict?: CloseEventInit): CloseEvent;
+};
+
+interface ConcatParams extends Algorithm {
+ algorithmId: Uint8Array;
+ hash?: string | Algorithm;
+ partyUInfo: Uint8Array;
+ partyVInfo: Uint8Array;
+ privateInfo?: Uint8Array;
+ publicInfo?: Uint8Array;
+}
+
+/** This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams. */
+interface CountQueuingStrategy extends QueuingStrategy {
+ highWaterMark: number;
+ size(chunk: any): 1;
+}
+
+declare var CountQueuingStrategy: {
+ prototype: CountQueuingStrategy;
+ new(options: { highWaterMark: number }): CountQueuingStrategy;
+};
+
+/** Basic cryptography features available in the current context. It allows access to a cryptographically strong random number generator and to cryptographic primitives. */
+interface Crypto {
+ readonly subtle: SubtleCrypto;
+ getRandomValues<T extends Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | null>(array: T): T;
+}
+
+declare var Crypto: {
+ prototype: Crypto;
+ new(): Crypto;
+};
+
+/** The CryptoKey dictionary of the Web Crypto API represents a cryptographic key. */
+interface CryptoKey {
+ readonly algorithm: KeyAlgorithm;
+ readonly extractable: boolean;
+ readonly type: KeyType;
+ readonly usages: KeyUsage[];
+}
+
+declare var CryptoKey: {
+ prototype: CryptoKey;
+ new(): CryptoKey;
+};
+
+interface CustomEvent<T = any> extends Event {
+ /**
+ * Returns any custom data event was created with. Typically used for synthetic events.
+ */
+ readonly detail: T;
+ initCustomEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, detailArg: T): void;
+}
+
+declare var CustomEvent: {
+ prototype: CustomEvent;
+ new<T>(typeArg: string, eventInitDict?: CustomEventInit<T>): CustomEvent<T>;
+};
+
+/** An abnormal event (called an exception) which occurs as a result of calling a method or accessing a property of a web API. */
+interface DOMException {
+ readonly code: number;
+ readonly message: string;
+ readonly name: string;
+ readonly ABORT_ERR: number;
+ readonly DATA_CLONE_ERR: number;
+ readonly DOMSTRING_SIZE_ERR: number;
+ readonly HIERARCHY_REQUEST_ERR: number;
+ readonly INDEX_SIZE_ERR: number;
+ readonly INUSE_ATTRIBUTE_ERR: number;
+ readonly INVALID_ACCESS_ERR: number;
+ readonly INVALID_CHARACTER_ERR: number;
+ readonly INVALID_MODIFICATION_ERR: number;
+ readonly INVALID_NODE_TYPE_ERR: number;
+ readonly INVALID_STATE_ERR: number;
+ readonly NAMESPACE_ERR: number;
+ readonly NETWORK_ERR: number;
+ readonly NOT_FOUND_ERR: number;
+ readonly NOT_SUPPORTED_ERR: number;
+ readonly NO_DATA_ALLOWED_ERR: number;
+ readonly NO_MODIFICATION_ALLOWED_ERR: number;
+ readonly QUOTA_EXCEEDED_ERR: number;
+ readonly SECURITY_ERR: number;
+ readonly SYNTAX_ERR: number;
+ readonly TIMEOUT_ERR: number;
+ readonly TYPE_MISMATCH_ERR: number;
+ readonly URL_MISMATCH_ERR: number;
+ readonly VALIDATION_ERR: number;
+ readonly WRONG_DOCUMENT_ERR: number;
+}
+
+declare var DOMException: {
+ prototype: DOMException;
+ new(message?: string, name?: string): DOMException;
+ readonly ABORT_ERR: number;
+ readonly DATA_CLONE_ERR: number;
+ readonly DOMSTRING_SIZE_ERR: number;
+ readonly HIERARCHY_REQUEST_ERR: number;
+ readonly INDEX_SIZE_ERR: number;
+ readonly INUSE_ATTRIBUTE_ERR: number;
+ readonly INVALID_ACCESS_ERR: number;
+ readonly INVALID_CHARACTER_ERR: number;
+ readonly INVALID_MODIFICATION_ERR: number;
+ readonly INVALID_NODE_TYPE_ERR: number;
+ readonly INVALID_STATE_ERR: number;
+ readonly NAMESPACE_ERR: number;
+ readonly NETWORK_ERR: number;
+ readonly NOT_FOUND_ERR: number;
+ readonly NOT_SUPPORTED_ERR: number;
+ readonly NO_DATA_ALLOWED_ERR: number;
+ readonly NO_MODIFICATION_ALLOWED_ERR: number;
+ readonly QUOTA_EXCEEDED_ERR: number;
+ readonly SECURITY_ERR: number;
+ readonly SYNTAX_ERR: number;
+ readonly TIMEOUT_ERR: number;
+ readonly TYPE_MISMATCH_ERR: number;
+ readonly URL_MISMATCH_ERR: number;
+ readonly VALIDATION_ERR: number;
+ readonly WRONG_DOCUMENT_ERR: number;
+};
+
+interface DOMMatrix extends DOMMatrixReadOnly {
+ a: number;
+ b: number;
+ c: number;
+ d: number;
+ e: number;
+ f: number;
+ m11: number;
+ m12: number;
+ m13: number;
+ m14: number;
+ m21: number;
+ m22: number;
+ m23: number;
+ m24: number;
+ m31: number;
+ m32: number;
+ m33: number;
+ m34: number;
+ m41: number;
+ m42: number;
+ m43: number;
+ m44: number;
+ invertSelf(): DOMMatrix;
+ multiplySelf(other?: DOMMatrixInit): DOMMatrix;
+ preMultiplySelf(other?: DOMMatrixInit): DOMMatrix;
+ rotateAxisAngleSelf(x?: number, y?: number, z?: number, angle?: number): DOMMatrix;
+ rotateFromVectorSelf(x?: number, y?: number): DOMMatrix;
+ rotateSelf(rotX?: number, rotY?: number, rotZ?: number): DOMMatrix;
+ scale3dSelf(scale?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix;
+ scaleSelf(scaleX?: number, scaleY?: number, scaleZ?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix;
+ skewXSelf(sx?: number): DOMMatrix;
+ skewYSelf(sy?: number): DOMMatrix;
+ translateSelf(tx?: number, ty?: number, tz?: number): DOMMatrix;
+}
+
+declare var DOMMatrix: {
+ prototype: DOMMatrix;
+ new(init?: string | number[]): DOMMatrix;
+ fromFloat32Array(array32: Float32Array): DOMMatrix;
+ fromFloat64Array(array64: Float64Array): DOMMatrix;
+ fromMatrix(other?: DOMMatrixInit): DOMMatrix;
+};
+
+interface DOMMatrixReadOnly {
+ readonly a: number;
+ readonly b: number;
+ readonly c: number;
+ readonly d: number;
+ readonly e: number;
+ readonly f: number;
+ readonly is2D: boolean;
+ readonly isIdentity: boolean;
+ readonly m11: number;
+ readonly m12: number;
+ readonly m13: number;
+ readonly m14: number;
+ readonly m21: number;
+ readonly m22: number;
+ readonly m23: number;
+ readonly m24: number;
+ readonly m31: number;
+ readonly m32: number;
+ readonly m33: number;
+ readonly m34: number;
+ readonly m41: number;
+ readonly m42: number;
+ readonly m43: number;
+ readonly m44: number;
+ flipX(): DOMMatrix;
+ flipY(): DOMMatrix;
+ inverse(): DOMMatrix;
+ multiply(other?: DOMMatrixInit): DOMMatrix;
+ rotate(rotX?: number, rotY?: number, rotZ?: number): DOMMatrix;
+ rotateAxisAngle(x?: number, y?: number, z?: number, angle?: number): DOMMatrix;
+ rotateFromVector(x?: number, y?: number): DOMMatrix;
+ scale(scaleX?: number, scaleY?: number, scaleZ?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix;
+ scale3d(scale?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix;
+ /** @deprecated */
+ scaleNonUniform(scaleX?: number, scaleY?: number): DOMMatrix;
+ skewX(sx?: number): DOMMatrix;
+ skewY(sy?: number): DOMMatrix;
+ toFloat32Array(): Float32Array;
+ toFloat64Array(): Float64Array;
+ toJSON(): any;
+ transformPoint(point?: DOMPointInit): DOMPoint;
+ translate(tx?: number, ty?: number, tz?: number): DOMMatrix;
+}
+
+declare var DOMMatrixReadOnly: {
+ prototype: DOMMatrixReadOnly;
+ new(init?: string | number[]): DOMMatrixReadOnly;
+ fromFloat32Array(array32: Float32Array): DOMMatrixReadOnly;
+ fromFloat64Array(array64: Float64Array): DOMMatrixReadOnly;
+ fromMatrix(other?: DOMMatrixInit): DOMMatrixReadOnly;
+};
+
+interface DOMPoint extends DOMPointReadOnly {
+ w: number;
+ x: number;
+ y: number;
+ z: number;
+}
+
+declare var DOMPoint: {
+ prototype: DOMPoint;
+ new(x?: number, y?: number, z?: number, w?: number): DOMPoint;
+ fromPoint(other?: DOMPointInit): DOMPoint;
+};
+
+interface DOMPointReadOnly {
+ readonly w: number;
+ readonly x: number;
+ readonly y: number;
+ readonly z: number;
+ matrixTransform(matrix?: DOMMatrixInit): DOMPoint;
+ toJSON(): any;
+}
+
+declare var DOMPointReadOnly: {
+ prototype: DOMPointReadOnly;
+ new(x?: number, y?: number, z?: number, w?: number): DOMPointReadOnly;
+ fromPoint(other?: DOMPointInit): DOMPointReadOnly;
+};
+
+interface DOMQuad {
+ readonly p1: DOMPoint;
+ readonly p2: DOMPoint;
+ readonly p3: DOMPoint;
+ readonly p4: DOMPoint;
+ getBounds(): DOMRect;
+ toJSON(): any;
+}
+
+declare var DOMQuad: {
+ prototype: DOMQuad;
+ new(p1?: DOMPointInit, p2?: DOMPointInit, p3?: DOMPointInit, p4?: DOMPointInit): DOMQuad;
+ fromQuad(other?: DOMQuadInit): DOMQuad;
+ fromRect(other?: DOMRectInit): DOMQuad;
+};
+
+interface DOMRect extends DOMRectReadOnly {
+ height: number;
+ width: number;
+ x: number;
+ y: number;
+}
+
+declare var DOMRect: {
+ prototype: DOMRect;
+ new(x?: number, y?: number, width?: number, height?: number): DOMRect;
+ fromRect(other?: DOMRectInit): DOMRect;
+};
+
+interface DOMRectReadOnly {
+ readonly bottom: number;
+ readonly height: number;
+ readonly left: number;
+ readonly right: number;
+ readonly top: number;
+ readonly width: number;
+ readonly x: number;
+ readonly y: number;
+ toJSON(): any;
+}
+
+declare var DOMRectReadOnly: {
+ prototype: DOMRectReadOnly;
+ new(x?: number, y?: number, width?: number, height?: number): DOMRectReadOnly;
+ fromRect(other?: DOMRectInit): DOMRectReadOnly;
+};
+
+/** A type returned by some APIs which contains a list of DOMString (strings). */
+interface DOMStringList {
+ /**
+ * Returns the number of strings in strings.
+ */
+ readonly length: number;
+ /**
+ * Returns true if strings contains string, and false otherwise.
+ */
+ contains(string: string): boolean;
+ /**
+ * Returns the string with index index from strings.
+ */
+ item(index: number): string | null;
+ [index: number]: string;
+}
+
+declare var DOMStringList: {
+ prototype: DOMStringList;
+ new(): DOMStringList;
+};
+
+interface DedicatedWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap {
+ "message": MessageEvent;
+ "messageerror": MessageEvent;
+}
+
+/** (the Worker global scope) is accessible through the self keyword. Some additional global functions, namespaces objects, and constructors, not typically associated with the worker global scope, but available on it, are listed in the JavaScript Reference. See also: Functions available to workers. */
+interface DedicatedWorkerGlobalScope extends WorkerGlobalScope, AnimationFrameProvider {
+ /**
+ * Returns dedicatedWorkerGlobal's name, i.e. the value given to the Worker constructor. Primarily useful for debugging.
+ */
+ readonly name: string;
+ onmessage: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null;
+ onmessageerror: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null;
+ /**
+ * Aborts dedicatedWorkerGlobal.
+ */
+ close(): void;
+ /**
+ * Clones message and transmits it to the Worker object associated with dedicatedWorkerGlobal. transfer can be passed as a list of objects that are to be transferred rather than cloned.
+ */
+ postMessage(message: any, transfer: Transferable[]): void;
+ postMessage(message: any, options?: PostMessageOptions): void;
+ addEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var DedicatedWorkerGlobalScope: {
+ prototype: DedicatedWorkerGlobalScope;
+ new(): DedicatedWorkerGlobalScope;
+};
+
+interface DhImportKeyParams extends Algorithm {
+ generator: Uint8Array;
+ prime: Uint8Array;
+}
+
+interface DhKeyAlgorithm extends KeyAlgorithm {
+ generator: Uint8Array;
+ prime: Uint8Array;
+}
+
+interface DhKeyDeriveParams extends Algorithm {
+ public: CryptoKey;
+}
+
+interface DhKeyGenParams extends Algorithm {
+ generator: Uint8Array;
+ prime: Uint8Array;
+}
+
+interface EXT_blend_minmax {
+ readonly MAX_EXT: GLenum;
+ readonly MIN_EXT: GLenum;
+}
+
+/** The EXT_frag_depth extension is part of the WebGL API and enables to set a depth value of a fragment from within the fragment shader. */
+interface EXT_frag_depth {
+}
+
+interface EXT_sRGB {
+ readonly FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT: GLenum;
+ readonly SRGB8_ALPHA8_EXT: GLenum;
+ readonly SRGB_ALPHA_EXT: GLenum;
+ readonly SRGB_EXT: GLenum;
+}
+
+interface EXT_shader_texture_lod {
+}
+
+/** The EXT_texture_filter_anisotropic extension is part of the WebGL API and exposes two constants for anisotropic filtering (AF). */
+interface EXT_texture_filter_anisotropic {
+ readonly MAX_TEXTURE_MAX_ANISOTROPY_EXT: GLenum;
+ readonly TEXTURE_MAX_ANISOTROPY_EXT: GLenum;
+}
+
+/** Events providing information related to errors in scripts or in files. */
+interface ErrorEvent extends Event {
+ readonly colno: number;
+ readonly error: any;
+ readonly filename: string;
+ readonly lineno: number;
+ readonly message: string;
+}
+
+declare var ErrorEvent: {
+ prototype: ErrorEvent;
+ new(type: string, eventInitDict?: ErrorEventInit): ErrorEvent;
+};
+
+/** An event which takes place in the DOM. */
+interface Event {
+ /**
+ * Returns true or false depending on how event was initialized. True if event goes through its target's ancestors in reverse tree order, and false otherwise.
+ */
+ readonly bubbles: boolean;
+ cancelBubble: boolean;
+ /**
+ * Returns true or false depending on how event was initialized. Its return value does not always carry meaning, but true can indicate that part of the operation during which event was dispatched, can be canceled by invoking the preventDefault() method.
+ */
+ readonly cancelable: boolean;
+ /**
+ * Returns true or false depending on how event was initialized. True if event invokes listeners past a ShadowRoot node that is the root of its target, and false otherwise.
+ */
+ readonly composed: boolean;
+ /**
+ * Returns the object whose event listener's callback is currently being invoked.
+ */
+ readonly currentTarget: EventTarget | null;
+ /**
+ * Returns true if preventDefault() was invoked successfully to indicate cancelation, and false otherwise.
+ */
+ readonly defaultPrevented: boolean;
+ /**
+ * Returns the event's phase, which is one of NONE, CAPTURING_PHASE, AT_TARGET, and BUBBLING_PHASE.
+ */
+ readonly eventPhase: number;
+ /**
+ * Returns true if event was dispatched by the user agent, and false otherwise.
+ */
+ readonly isTrusted: boolean;
+ returnValue: boolean;
+ /** @deprecated */
+ readonly srcElement: EventTarget | null;
+ /**
+ * Returns the object to which event is dispatched (its target).
+ */
+ readonly target: EventTarget | null;
+ /**
+ * Returns the event's timestamp as the number of milliseconds measured relative to the time origin.
+ */
+ readonly timeStamp: number;
+ /**
+ * Returns the type of event, e.g. "click", "hashchange", or "submit".
+ */
+ readonly type: string;
+ /**
+ * Returns the invocation target objects of event's path (objects on which listeners will be invoked), except for any nodes in shadow trees of which the shadow root's mode is "closed" that are not reachable from event's currentTarget.
+ */
+ composedPath(): EventTarget[];
+ initEvent(type: string, bubbles?: boolean, cancelable?: boolean): void;
+ /**
+ * If invoked when the cancelable attribute value is true, and while executing a listener for the event with passive set to false, signals to the operation that caused event to be dispatched that it needs to be canceled.
+ */
+ preventDefault(): void;
+ /**
+ * Invoking this method prevents event from reaching any registered event listeners after the current one finishes running and, when dispatched in a tree, also prevents event from reaching any other objects.
+ */
+ stopImmediatePropagation(): void;
+ /**
+ * When dispatched in a tree, invoking this method prevents event from reaching any objects other than the current object.
+ */
+ stopPropagation(): void;
+ readonly AT_TARGET: number;
+ readonly BUBBLING_PHASE: number;
+ readonly CAPTURING_PHASE: number;
+ readonly NONE: number;
+}
+
+declare var Event: {
+ prototype: Event;
+ new(type: string, eventInitDict?: EventInit): Event;
+ readonly AT_TARGET: number;
+ readonly BUBBLING_PHASE: number;
+ readonly CAPTURING_PHASE: number;
+ readonly NONE: number;
+};
+
+interface EventListenerObject {
+ handleEvent(evt: Event): void;
+}
+
+interface EventSourceEventMap {
+ "error": Event;
+ "message": MessageEvent;
+ "open": Event;
+}
+
+interface EventSource extends EventTarget {
+ onerror: ((this: EventSource, ev: Event) => any) | null;
+ onmessage: ((this: EventSource, ev: MessageEvent) => any) | null;
+ onopen: ((this: EventSource, ev: Event) => any) | null;
+ /**
+ * Returns the state of this EventSource object's connection. It can have the values described below.
+ */
+ readonly readyState: number;
+ /**
+ * Returns the URL providing the event stream.
+ */
+ readonly url: string;
+ /**
+ * Returns true if the credentials mode for connection requests to the URL providing the event stream is set to "include", and false otherwise.
+ */
+ readonly withCredentials: boolean;
+ /**
+ * Aborts any instances of the fetch algorithm started for this EventSource object, and sets the readyState attribute to CLOSED.
+ */
+ close(): void;
+ readonly CLOSED: number;
+ readonly CONNECTING: number;
+ readonly OPEN: number;
+ addEventListener<K extends keyof EventSourceEventMap>(type: K, listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof EventSourceEventMap>(type: K, listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var EventSource: {
+ prototype: EventSource;
+ new(url: string, eventSourceInitDict?: EventSourceInit): EventSource;
+ readonly CLOSED: number;
+ readonly CONNECTING: number;
+ readonly OPEN: number;
+};
+
+/** EventTarget is a DOM interface implemented by objects that can receive events and may have listeners for them. */
+interface EventTarget {
+ /**
+ * Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
+ *
+ * The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
+ *
+ * When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
+ *
+ * When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
+ *
+ * When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
+ *
+ * The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
+ */
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject | null, options?: boolean | AddEventListenerOptions): void;
+ /**
+ * Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
+ */
+ dispatchEvent(event: Event): boolean;
+ /**
+ * Removes the event listener in target's event listener list with the same type, callback, and options.
+ */
+ removeEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void;
+}
+
+declare var EventTarget: {
+ prototype: EventTarget;
+ new(): EventTarget;
+};
+
+/** 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. */
+interface ExtendableEvent extends Event {
+ waitUntil(f: any): void;
+}
+
+declare var ExtendableEvent: {
+ prototype: ExtendableEvent;
+ new(type: string, eventInitDict?: ExtendableEventInit): ExtendableEvent;
+};
+
+/** This ServiceWorker API interface represents the event object of a message event fired on a service worker (when a channel message is received on the ServiceWorkerGlobalScope from another context) — extends the lifetime of such events. */
+interface ExtendableMessageEvent extends ExtendableEvent {
+ readonly data: any;
+ readonly lastEventId: string;
+ readonly origin: string;
+ readonly ports: ReadonlyArray<MessagePort>;
+ readonly source: Client | ServiceWorker | MessagePort | null;
+}
+
+declare var ExtendableMessageEvent: {
+ prototype: ExtendableMessageEvent;
+ new(type: string, eventInitDict?: ExtendableMessageEventInit): ExtendableMessageEvent;
+};
+
+/** 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. */
+interface FetchEvent extends ExtendableEvent {
+ readonly clientId: string;
+ readonly preloadResponse: Promise<any>;
+ readonly replacesClientId: string;
+ readonly request: Request;
+ readonly resultingClientId: string;
+ respondWith(r: Response | Promise<Response>): void;
+}
+
+declare var FetchEvent: {
+ prototype: FetchEvent;
+ new(type: string, eventInitDict: FetchEventInit): FetchEvent;
+};
+
+/** Provides information about files and allows JavaScript in a web page to access their content. */
+interface File extends Blob {
+ readonly lastModified: number;
+ readonly name: string;
+}
+
+declare var File: {
+ prototype: File;
+ new(fileBits: BlobPart[], fileName: string, options?: FilePropertyBag): File;
+};
+
+/** An object of this type is returned by the files property of the HTML <input> element; this lets you access the list of files selected with the <input type="file"> element. It's also used for a list of files dropped into web content when using the drag and drop API; see the DataTransfer object for details on this usage. */
+interface FileList {
+ readonly length: number;
+ item(index: number): File | null;
+ [index: number]: File;
+}
+
+declare var FileList: {
+ prototype: FileList;
+ new(): FileList;
+};
+
+interface FileReaderEventMap {
+ "abort": ProgressEvent<FileReader>;
+ "error": ProgressEvent<FileReader>;
+ "load": ProgressEvent<FileReader>;
+ "loadend": ProgressEvent<FileReader>;
+ "loadstart": ProgressEvent<FileReader>;
+ "progress": ProgressEvent<FileReader>;
+}
+
+/** Lets web applications asynchronously read the contents of files (or raw data buffers) stored on the user's computer, using File or Blob objects to specify the file or data to read. */
+interface FileReader extends EventTarget {
+ readonly error: DOMException | null;
+ onabort: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
+ onerror: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
+ onload: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
+ onloadend: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
+ onloadstart: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
+ onprogress: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
+ readonly readyState: number;
+ readonly result: string | ArrayBuffer | null;
+ abort(): void;
+ readAsArrayBuffer(blob: Blob): void;
+ readAsBinaryString(blob: Blob): void;
+ readAsDataURL(blob: Blob): void;
+ readAsText(blob: Blob, encoding?: string): void;
+ readonly DONE: number;
+ readonly EMPTY: number;
+ readonly LOADING: number;
+ addEventListener<K extends keyof FileReaderEventMap>(type: K, listener: (this: FileReader, ev: FileReaderEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof FileReaderEventMap>(type: K, listener: (this: FileReader, ev: FileReaderEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var FileReader: {
+ prototype: FileReader;
+ new(): FileReader;
+ readonly DONE: number;
+ readonly EMPTY: number;
+ readonly LOADING: number;
+};
+
+/** Allows to read File or Blob objects in a synchronous way. */
+interface FileReaderSync {
+ readAsArrayBuffer(blob: Blob): ArrayBuffer;
+ readAsBinaryString(blob: Blob): string;
+ readAsDataURL(blob: Blob): string;
+ readAsText(blob: Blob, encoding?: string): string;
+}
+
+declare var FileReaderSync: {
+ prototype: FileReaderSync;
+ new(): FileReaderSync;
+};
+
+/** Provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using the XMLHttpRequest.send() method. It uses the same format a form would use if the encoding type were set to "multipart/form-data". */
+interface FormData {
+ append(name: string, value: string | Blob, fileName?: string): void;
+ delete(name: string): void;
+ get(name: string): FormDataEntryValue | null;
+ getAll(name: string): FormDataEntryValue[];
+ has(name: string): boolean;
+ set(name: string, value: string | Blob, fileName?: string): void;
+ forEach(callbackfn: (value: FormDataEntryValue, key: string, parent: FormData) => void, thisArg?: any): void;
+}
+
+declare var FormData: {
+ prototype: FormData;
+ new(): FormData;
+};
+
+interface GenericTransformStream {
+ /**
+ * Returns a readable stream whose chunks are strings resulting from running encoding's decoder on the chunks written to writable.
+ */
+ readonly readable: ReadableStream;
+ /**
+ * Returns a writable stream which accepts [AllowShared] BufferSource chunks and runs them through encoding's decoder before making them available to readable.
+ *
+ * Typically this will be used via the pipeThrough() method on a ReadableStream source.
+ *
+ * ```
+ * var decoder = new TextDecoderStream(encoding);
+ * byteReadable
+ * .pipeThrough(decoder)
+ * .pipeTo(textWritable);
+ * ```
+ *
+ * If the error mode is "fatal" and encoding's decoder returns error, both readable and writable will be errored with a TypeError.
+ */
+ readonly writable: WritableStream;
+}
+
+/** This Fetch API interface allows you to perform various actions on HTTP request and response headers. These actions include retrieving, setting, adding to, and removing. A Headers object has an associated header list, which is initially empty and consists of zero or more name and value pairs.  You can add to this using methods like append() (see Examples.) In all methods of this interface, header names are matched by case-insensitive byte sequence. */
+interface Headers {
+ append(name: string, value: string): void;
+ delete(name: string): void;
+ get(name: string): string | null;
+ has(name: string): boolean;
+ set(name: string, value: string): void;
+ forEach(callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any): void;
+}
+
+declare var Headers: {
+ prototype: Headers;
+ new(init?: HeadersInit): Headers;
+};
+
+interface HkdfCtrParams extends Algorithm {
+ context: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer;
+ hash: string | Algorithm;
+ label: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer;
+}
+
+interface IDBArrayKey extends Array<IDBValidKey> {
+}
+
+/** This IndexedDB API interface represents a cursor for traversing or iterating over multiple records in a database. */
+interface IDBCursor {
+ /**
+ * Returns the direction ("next", "nextunique", "prev" or "prevunique") of the cursor.
+ */
+ readonly direction: IDBCursorDirection;
+ /**
+ * Returns the key of the cursor. Throws a "InvalidStateError" DOMException if the cursor is advancing or is finished.
+ */
+ readonly key: IDBValidKey;
+ /**
+ * Returns the effective key of the cursor. Throws a "InvalidStateError" DOMException if the cursor is advancing or is finished.
+ */
+ readonly primaryKey: IDBValidKey;
+ /**
+ * Returns the IDBObjectStore or IDBIndex the cursor was opened from.
+ */
+ readonly source: IDBObjectStore | IDBIndex;
+ /**
+ * Advances the cursor through the next count records in range.
+ */
+ advance(count: number): void;
+ /**
+ * Advances the cursor to the next record in range.
+ */
+ continue(key?: IDBValidKey): void;
+ /**
+ * Advances the cursor to the next record in range matching or after key and primaryKey. Throws an "InvalidAccessError" DOMException if the source is not an index.
+ */
+ continuePrimaryKey(key: IDBValidKey, primaryKey: IDBValidKey): void;
+ /**
+ * Delete the record pointed at by the cursor with a new value.
+ *
+ * If successful, request's result will be undefined.
+ */
+ delete(): IDBRequest<undefined>;
+ /**
+ * Updated the record pointed at by the cursor with a new value.
+ *
+ * Throws a "DataError" DOMException if the effective object store uses in-line keys and the key would have changed.
+ *
+ * If successful, request's result will be the record's key.
+ */
+ update(value: any): IDBRequest<IDBValidKey>;
+}
+
+declare var IDBCursor: {
+ prototype: IDBCursor;
+ new(): IDBCursor;
+};
+
+/** This IndexedDB API interface represents a cursor for traversing or iterating over multiple records in a database. It is the same as the IDBCursor, except that it includes the value property. */
+interface IDBCursorWithValue extends IDBCursor {
+ /**
+ * Returns the cursor's current value.
+ */
+ readonly value: any;
+}
+
+declare var IDBCursorWithValue: {
+ prototype: IDBCursorWithValue;
+ new(): IDBCursorWithValue;
+};
+
+interface IDBDatabaseEventMap {
+ "abort": Event;
+ "close": Event;
+ "error": Event;
+ "versionchange": IDBVersionChangeEvent;
+}
+
+/** This IndexedDB API interface provides a connection to a database; you can use an IDBDatabase object to open a transaction on your database then create, manipulate, and delete objects (data) in that database. The interface provides the only way to get and manage versions of the database. */
+interface IDBDatabase extends EventTarget {
+ /**
+ * Returns the name of the database.
+ */
+ readonly name: string;
+ /**
+ * Returns a list of the names of object stores in the database.
+ */
+ readonly objectStoreNames: DOMStringList;
+ onabort: ((this: IDBDatabase, ev: Event) => any) | null;
+ onclose: ((this: IDBDatabase, ev: Event) => any) | null;
+ onerror: ((this: IDBDatabase, ev: Event) => any) | null;
+ onversionchange: ((this: IDBDatabase, ev: IDBVersionChangeEvent) => any) | null;
+ /**
+ * Returns the version of the database.
+ */
+ readonly version: number;
+ /**
+ * Closes the connection once all running transactions have finished.
+ */
+ close(): void;
+ /**
+ * Creates a new object store with the given name and options and returns a new IDBObjectStore.
+ *
+ * Throws a "InvalidStateError" DOMException if not called within an upgrade transaction.
+ */
+ createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore;
+ /**
+ * Deletes the object store with the given name.
+ *
+ * Throws a "InvalidStateError" DOMException if not called within an upgrade transaction.
+ */
+ deleteObjectStore(name: string): void;
+ /**
+ * Returns a new transaction with the given mode ("readonly" or "readwrite") and scope which can be a single object store name or an array of names.
+ */
+ transaction(storeNames: string | string[], mode?: IDBTransactionMode): IDBTransaction;
+ addEventListener<K extends keyof IDBDatabaseEventMap>(type: K, listener: (this: IDBDatabase, ev: IDBDatabaseEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof IDBDatabaseEventMap>(type: K, listener: (this: IDBDatabase, ev: IDBDatabaseEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var IDBDatabase: {
+ prototype: IDBDatabase;
+ new(): IDBDatabase;
+};
+
+/** In the following code snippet, we make a request to open a database, and include handlers for the success and error cases. For a full working example, see our To-do Notifications app (view example live.) */
+interface IDBFactory {
+ /**
+ * Compares two values as keys. Returns -1 if key1 precedes key2, 1 if key2 precedes key1, and 0 if the keys are equal.
+ *
+ * Throws a "DataError" DOMException if either input is not a valid key.
+ */
+ cmp(first: any, second: any): number;
+ /**
+ * Attempts to delete the named database. If the database already exists and there are open connections that don't close in response to a versionchange event, the request will be blocked until all they close. If the request is successful request's result will be null.
+ */
+ deleteDatabase(name: string): IDBOpenDBRequest;
+ /**
+ * Attempts to open a connection to the named database with the current version, or 1 if it does not already exist. If the request is successful request's result will be the connection.
+ */
+ open(name: string, version?: number): IDBOpenDBRequest;
+}
+
+declare var IDBFactory: {
+ prototype: IDBFactory;
+ new(): IDBFactory;
+};
+
+/** IDBIndex interface of the IndexedDB API provides asynchronous access to an index in a database. An index is a kind of object store for looking up records in another object store, called the referenced object store. You use this interface to retrieve data. */
+interface IDBIndex {
+ readonly keyPath: string | string[];
+ readonly multiEntry: boolean;
+ /**
+ * Returns the name of the index.
+ */
+ name: string;
+ /**
+ * Returns the IDBObjectStore the index belongs to.
+ */
+ readonly objectStore: IDBObjectStore;
+ readonly unique: boolean;
+ /**
+ * Retrieves the number of records matching the given key or key range in query.
+ *
+ * If successful, request's result will be the count.
+ */
+ count(key?: IDBValidKey | IDBKeyRange): IDBRequest<number>;
+ /**
+ * Retrieves the value of the first record matching the given key or key range in query.
+ *
+ * If successful, request's result will be the value, or undefined if there was no matching record.
+ */
+ get(key: IDBValidKey | IDBKeyRange): IDBRequest<any | undefined>;
+ /**
+ * Retrieves the values of the records matching the given key or key range in query (up to count if given).
+ *
+ * If successful, request's result will be an Array of the values.
+ */
+ getAll(query?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest<any[]>;
+ /**
+ * Retrieves the keys of records matching the given key or key range in query (up to count if given).
+ *
+ * If successful, request's result will be an Array of the keys.
+ */
+ getAllKeys(query?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest<IDBValidKey[]>;
+ /**
+ * Retrieves the key of the first record matching the given key or key range in query.
+ *
+ * If successful, request's result will be the key, or undefined if there was no matching record.
+ */
+ getKey(key: IDBValidKey | IDBKeyRange): IDBRequest<IDBValidKey | undefined>;
+ /**
+ * Opens a cursor over the records matching query, ordered by direction. If query is null, all records in index are matched.
+ *
+ * If successful, request's result will be an IDBCursorWithValue, or null if there were no matching records.
+ */
+ openCursor(query?: IDBValidKey | IDBKeyRange | null, direction?: IDBCursorDirection): IDBRequest<IDBCursorWithValue | null>;
+ /**
+ * Opens a cursor with key only flag set over the records matching query, ordered by direction. If query is null, all records in index are matched.
+ *
+ * If successful, request's result will be an IDBCursor, or null if there were no matching records.
+ */
+ openKeyCursor(query?: IDBValidKey | IDBKeyRange | null, direction?: IDBCursorDirection): IDBRequest<IDBCursor | null>;
+}
+
+declare var IDBIndex: {
+ prototype: IDBIndex;
+ new(): IDBIndex;
+};
+
+/** A key range can be a single value or a range with upper and lower bounds or endpoints. If the key range has both upper and lower bounds, then it is bounded; if it has no bounds, it is unbounded. A bounded key range can either be open (the endpoints are excluded) or closed (the endpoints are included). To retrieve all keys within a certain range, you can use the following code constructs: */
+interface IDBKeyRange {
+ /**
+ * Returns lower bound, or undefined if none.
+ */
+ readonly lower: any;
+ /**
+ * Returns true if the lower open flag is set, and false otherwise.
+ */
+ readonly lowerOpen: boolean;
+ /**
+ * Returns upper bound, or undefined if none.
+ */
+ readonly upper: any;
+ /**
+ * Returns true if the upper open flag is set, and false otherwise.
+ */
+ readonly upperOpen: boolean;
+ /**
+ * Returns true if key is included in the range, and false otherwise.
+ */
+ includes(key: any): boolean;
+}
+
+declare var IDBKeyRange: {
+ prototype: IDBKeyRange;
+ new(): IDBKeyRange;
+ /**
+ * Returns a new IDBKeyRange spanning from lower to upper. If lowerOpen is true, lower is not included in the range. If upperOpen is true, upper is not included in the range.
+ */
+ bound(lower: any, upper: any, lowerOpen?: boolean, upperOpen?: boolean): IDBKeyRange;
+ /**
+ * Returns a new IDBKeyRange starting at key with no upper bound. If open is true, key is not included in the range.
+ */
+ lowerBound(lower: any, open?: boolean): IDBKeyRange;
+ /**
+ * Returns a new IDBKeyRange spanning only key.
+ */
+ only(value: any): IDBKeyRange;
+ /**
+ * Returns a new IDBKeyRange with no lower bound and ending at key. If open is true, key is not included in the range.
+ */
+ upperBound(upper: any, open?: boolean): IDBKeyRange;
+};
+
+/** This example shows a variety of different uses of object stores, from updating the data structure with IDBObjectStore.createIndex inside an onupgradeneeded function, to adding a new item to our object store with IDBObjectStore.add. For a full working example, see our To-do Notifications app (view example live.) */
+interface IDBObjectStore {
+ /**
+ * Returns true if the store has a key generator, and false otherwise.
+ */
+ readonly autoIncrement: boolean;
+ /**
+ * Returns a list of the names of indexes in the store.
+ */
+ readonly indexNames: DOMStringList;
+ /**
+ * Returns the key path of the store, or null if none.
+ */
+ readonly keyPath: string | string[];
+ /**
+ * Returns the name of the store.
+ */
+ name: string;
+ /**
+ * Returns the associated transaction.
+ */
+ readonly transaction: IDBTransaction;
+ /**
+ * Adds or updates a record in store with the given value and key.
+ *
+ * If the store uses in-line keys and key is specified a "DataError" DOMException will be thrown.
+ *
+ * If put() is used, any existing record with the key will be replaced. If add() is used, and if a record with the key already exists the request will fail, with request's error set to a "ConstraintError" DOMException.
+ *
+ * If successful, request's result will be the record's key.
+ */
+ add(value: any, key?: IDBValidKey): IDBRequest<IDBValidKey>;
+ /**
+ * Deletes all records in store.
+ *
+ * If successful, request's result will be undefined.
+ */
+ clear(): IDBRequest<undefined>;
+ /**
+ * Retrieves the number of records matching the given key or key range in query.
+ *
+ * If successful, request's result will be the count.
+ */
+ count(key?: IDBValidKey | IDBKeyRange): IDBRequest<number>;
+ /**
+ * Creates a new index in store with the given name, keyPath and options and returns a new IDBIndex. If the keyPath and options define constraints that cannot be satisfied with the data already in store the upgrade transaction will abort with a "ConstraintError" DOMException.
+ *
+ * Throws an "InvalidStateError" DOMException if not called within an upgrade transaction.
+ */
+ createIndex(name: string, keyPath: string | string[], options?: IDBIndexParameters): IDBIndex;
+ /**
+ * Deletes records in store with the given key or in the given key range in query.
+ *
+ * If successful, request's result will be undefined.
+ */
+ delete(key: IDBValidKey | IDBKeyRange): IDBRequest<undefined>;
+ /**
+ * Deletes the index in store with the given name.
+ *
+ * Throws an "InvalidStateError" DOMException if not called within an upgrade transaction.
+ */
+ deleteIndex(name: string): void;
+ /**
+ * Retrieves the value of the first record matching the given key or key range in query.
+ *
+ * If successful, request's result will be the value, or undefined if there was no matching record.
+ */
+ get(query: IDBValidKey | IDBKeyRange): IDBRequest<any | undefined>;
+ /**
+ * Retrieves the values of the records matching the given key or key range in query (up to count if given).
+ *
+ * If successful, request's result will be an Array of the values.
+ */
+ getAll(query?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest<any[]>;
+ /**
+ * Retrieves the keys of records matching the given key or key range in query (up to count if given).
+ *
+ * If successful, request's result will be an Array of the keys.
+ */
+ getAllKeys(query?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest<IDBValidKey[]>;
+ /**
+ * Retrieves the key of the first record matching the given key or key range in query.
+ *
+ * If successful, request's result will be the key, or undefined if there was no matching record.
+ */
+ getKey(query: IDBValidKey | IDBKeyRange): IDBRequest<IDBValidKey | undefined>;
+ index(name: string): IDBIndex;
+ /**
+ * Opens a cursor over the records matching query, ordered by direction. If query is null, all records in store are matched.
+ *
+ * If successful, request's result will be an IDBCursorWithValue pointing at the first matching record, or null if there were no matching records.
+ */
+ openCursor(query?: IDBValidKey | IDBKeyRange | null, direction?: IDBCursorDirection): IDBRequest<IDBCursorWithValue | null>;
+ /**
+ * Opens a cursor with key only flag set over the records matching query, ordered by direction. If query is null, all records in store are matched.
+ *
+ * If successful, request's result will be an IDBCursor pointing at the first matching record, or null if there were no matching records.
+ */
+ openKeyCursor(query?: IDBValidKey | IDBKeyRange | null, direction?: IDBCursorDirection): IDBRequest<IDBCursor | null>;
+ /**
+ * Adds or updates a record in store with the given value and key.
+ *
+ * If the store uses in-line keys and key is specified a "DataError" DOMException will be thrown.
+ *
+ * If put() is used, any existing record with the key will be replaced. If add() is used, and if a record with the key already exists the request will fail, with request's error set to a "ConstraintError" DOMException.
+ *
+ * If successful, request's result will be the record's key.
+ */
+ put(value: any, key?: IDBValidKey): IDBRequest<IDBValidKey>;
+}
+
+declare var IDBObjectStore: {
+ prototype: IDBObjectStore;
+ new(): IDBObjectStore;
+};
+
+interface IDBOpenDBRequestEventMap extends IDBRequestEventMap {
+ "blocked": Event;
+ "upgradeneeded": IDBVersionChangeEvent;
+}
+
+/** Also inherits methods from its parents IDBRequest and EventTarget. */
+interface IDBOpenDBRequest extends IDBRequest<IDBDatabase> {
+ onblocked: ((this: IDBOpenDBRequest, ev: Event) => any) | null;
+ onupgradeneeded: ((this: IDBOpenDBRequest, ev: IDBVersionChangeEvent) => any) | null;
+ addEventListener<K extends keyof IDBOpenDBRequestEventMap>(type: K, listener: (this: IDBOpenDBRequest, ev: IDBOpenDBRequestEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof IDBOpenDBRequestEventMap>(type: K, listener: (this: IDBOpenDBRequest, ev: IDBOpenDBRequestEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var IDBOpenDBRequest: {
+ prototype: IDBOpenDBRequest;
+ new(): IDBOpenDBRequest;
+};
+
+interface IDBRequestEventMap {
+ "error": Event;
+ "success": Event;
+}
+
+/** The request object does not initially contain any information about the result of the operation, but once information becomes available, an event is fired on the request, and the information becomes available through the properties of the IDBRequest instance. */
+interface IDBRequest<T = any> extends EventTarget {
+ /**
+ * When a request is completed, returns the error (a DOMException), or null if the request succeeded. Throws a "InvalidStateError" DOMException if the request is still pending.
+ */
+ readonly error: DOMException | null;
+ onerror: ((this: IDBRequest<T>, ev: Event) => any) | null;
+ onsuccess: ((this: IDBRequest<T>, ev: Event) => any) | null;
+ /**
+ * Returns "pending" until a request is complete, then returns "done".
+ */
+ readonly readyState: IDBRequestReadyState;
+ /**
+ * When a request is completed, returns the result, or undefined if the request failed. Throws a "InvalidStateError" DOMException if the request is still pending.
+ */
+ readonly result: T;
+ /**
+ * Returns the IDBObjectStore, IDBIndex, or IDBCursor the request was made against, or null if is was an open request.
+ */
+ readonly source: IDBObjectStore | IDBIndex | IDBCursor;
+ /**
+ * Returns the IDBTransaction the request was made within. If this as an open request, then it returns an upgrade transaction while it is running, or null otherwise.
+ */
+ readonly transaction: IDBTransaction | null;
+ addEventListener<K extends keyof IDBRequestEventMap>(type: K, listener: (this: IDBRequest<T>, ev: IDBRequestEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof IDBRequestEventMap>(type: K, listener: (this: IDBRequest<T>, ev: IDBRequestEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var IDBRequest: {
+ prototype: IDBRequest;
+ new(): IDBRequest;
+};
+
+interface IDBTransactionEventMap {
+ "abort": Event;
+ "complete": Event;
+ "error": Event;
+}
+
+interface IDBTransaction extends EventTarget {
+ /**
+ * Returns the transaction's connection.
+ */
+ readonly db: IDBDatabase;
+ /**
+ * If the transaction was aborted, returns the error (a DOMException) providing the reason.
+ */
+ readonly error: DOMException;
+ /**
+ * Returns the mode the transaction was created with ("readonly" or "readwrite"), or "versionchange" for an upgrade transaction.
+ */
+ readonly mode: IDBTransactionMode;
+ /**
+ * Returns a list of the names of object stores in the transaction's scope. For an upgrade transaction this is all object stores in the database.
+ */
+ readonly objectStoreNames: DOMStringList;
+ onabort: ((this: IDBTransaction, ev: Event) => any) | null;
+ oncomplete: ((this: IDBTransaction, ev: Event) => any) | null;
+ onerror: ((this: IDBTransaction, ev: Event) => any) | null;
+ /**
+ * Aborts the transaction. All pending requests will fail with a "AbortError" DOMException and all changes made to the database will be reverted.
+ */
+ abort(): void;
+ /**
+ * Returns an IDBObjectStore in the transaction's scope.
+ */
+ objectStore(name: string): IDBObjectStore;
+ addEventListener<K extends keyof IDBTransactionEventMap>(type: K, listener: (this: IDBTransaction, ev: IDBTransactionEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof IDBTransactionEventMap>(type: K, listener: (this: IDBTransaction, ev: IDBTransactionEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var IDBTransaction: {
+ prototype: IDBTransaction;
+ new(): IDBTransaction;
+};
+
+/** This IndexedDB API interface indicates that the version of the database has changed, as the result of an IDBOpenDBRequest.onupgradeneeded event handler function. */
+interface IDBVersionChangeEvent extends Event {
+ readonly newVersion: number | null;
+ readonly oldVersion: number;
+}
+
+declare var IDBVersionChangeEvent: {
+ prototype: IDBVersionChangeEvent;
+ new(type: string, eventInitDict?: IDBVersionChangeEventInit): IDBVersionChangeEvent;
+};
+
+interface ImageBitmap {
+ /**
+ * Returns the intrinsic height of the image, in CSS pixels.
+ */
+ readonly height: number;
+ /**
+ * Returns the intrinsic width of the image, in CSS pixels.
+ */
+ readonly width: number;
+ /**
+ * Releases imageBitmap's underlying bitmap data.
+ */
+ close(): void;
+}
+
+declare var ImageBitmap: {
+ prototype: ImageBitmap;
+ new(): ImageBitmap;
+};
+
+interface ImageBitmapRenderingContext {
+ /**
+ * Returns the canvas element that the context is bound to.
+ */
+ readonly canvas: OffscreenCanvas;
+ /**
+ * Transfers the underlying bitmap data from imageBitmap to context, and the bitmap becomes the contents of the canvas element to which context is bound.
+ */
+ transferFromImageBitmap(bitmap: ImageBitmap | null): void;
+}
+
+declare var ImageBitmapRenderingContext: {
+ prototype: ImageBitmapRenderingContext;
+ new(): ImageBitmapRenderingContext;
+};
+
+/** The underlying pixel data of an area of a <canvas> element. It is created using the ImageData() constructor or creator methods on the CanvasRenderingContext2D object associated with a canvas: createImageData() and getImageData(). It can also be used to set a part of the canvas by using putImageData(). */
+interface ImageData {
+ /**
+ * Returns the one-dimensional array containing the data in RGBA order, as integers in the range 0 to 255.
+ */
+ readonly data: Uint8ClampedArray;
+ /**
+ * Returns the actual dimensions of the data in the ImageData object, in pixels.
+ */
+ readonly height: number;
+ /**
+ * Returns the actual dimensions of the data in the ImageData object, in pixels.
+ */
+ readonly width: number;
+}
+
+declare var ImageData: {
+ prototype: ImageData;
+ new(width: number, height: number): ImageData;
+ new(array: Uint8ClampedArray, width: number, height?: number): ImageData;
+};
+
+/** This Channel Messaging API interface allows us to create a new message channel and send data through it via its two MessagePort properties. */
+interface MessageChannel {
+ /**
+ * Returns the first MessagePort object.
+ */
+ readonly port1: MessagePort;
+ /**
+ * Returns the second MessagePort object.
+ */
+ readonly port2: MessagePort;
+}
+
+declare var MessageChannel: {
+ prototype: MessageChannel;
+ new(): MessageChannel;
+};
+
+/** A message received by a target object. */
+interface MessageEvent extends Event {
+ /**
+ * Returns the data of the message.
+ */
+ readonly data: any;
+ /**
+ * Returns the last event ID string, for server-sent events.
+ */
+ readonly lastEventId: string;
+ /**
+ * Returns the origin of the message, for server-sent events and cross-document messaging.
+ */
+ readonly origin: string;
+ /**
+ * Returns the MessagePort array sent with the message, for cross-document messaging and channel messaging.
+ */
+ readonly ports: ReadonlyArray<MessagePort>;
+ /**
+ * Returns the WindowProxy of the source window, for cross-document messaging, and the MessagePort being attached, in the connect event fired at SharedWorkerGlobalScope objects.
+ */
+ readonly source: MessageEventSource | null;
+}
+
+declare var MessageEvent: {
+ prototype: MessageEvent;
+ new(type: string, eventInitDict?: MessageEventInit): MessageEvent;
+};
+
+interface MessagePortEventMap {
+ "message": MessageEvent;
+ "messageerror": MessageEvent;
+}
+
+/** This Channel Messaging API interface represents one of the two ports of a MessageChannel, allowing messages to be sent from one port and listening out for them arriving at the other. */
+interface MessagePort extends EventTarget {
+ onmessage: ((this: MessagePort, ev: MessageEvent) => any) | null;
+ onmessageerror: ((this: MessagePort, ev: MessageEvent) => any) | null;
+ /**
+ * Disconnects the port, so that it is no longer active.
+ */
+ close(): void;
+ /**
+ * Posts a message through the channel. Objects listed in transfer are transferred, not just cloned, meaning that they are no longer usable on the sending side.
+ *
+ * Throws a "DataCloneError" DOMException if transfer contains duplicate objects or port, or if message could not be cloned.
+ */
+ postMessage(message: any, transfer: Transferable[]): void;
+ postMessage(message: any, options?: PostMessageOptions): void;
+ /**
+ * Begins dispatching messages received on the port.
+ */
+ start(): void;
+ addEventListener<K extends keyof MessagePortEventMap>(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof MessagePortEventMap>(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var MessagePort: {
+ prototype: MessagePort;
+ new(): MessagePort;
+};
+
+interface NavigationPreloadManager {
+ disable(): Promise<void>;
+ enable(): Promise<void>;
+ getState(): Promise<NavigationPreloadState>;
+ setHeaderValue(value: string): Promise<void>;
+}
+
+declare var NavigationPreloadManager: {
+ prototype: NavigationPreloadManager;
+ new(): NavigationPreloadManager;
+};
+
+interface NavigatorConcurrentHardware {
+ readonly hardwareConcurrency: number;
+}
+
+interface NavigatorID {
+ readonly appCodeName: string;
+ readonly appName: string;
+ readonly appVersion: string;
+ readonly platform: string;
+ readonly product: string;
+ readonly userAgent: string;
+}
+
+interface NavigatorLanguage {
+ readonly language: string;
+ readonly languages: ReadonlyArray<string>;
+}
+
+interface NavigatorOnLine {
+ readonly onLine: boolean;
+}
+
+interface NavigatorStorage {
+ readonly storage: StorageManager;
+}
+
+interface NotificationEventMap {
+ "click": Event;
+ "close": Event;
+ "error": Event;
+ "show": Event;
+}
+
+/** This Notifications API interface is used to configure and display desktop notifications to the user. */
+interface Notification extends EventTarget {
+ readonly actions: ReadonlyArray<NotificationAction>;
+ readonly badge: string;
+ readonly body: string;
+ readonly data: any;
+ readonly dir: NotificationDirection;
+ readonly icon: string;
+ readonly image: string;
+ readonly lang: string;
+ onclick: ((this: Notification, ev: Event) => any) | null;
+ onclose: ((this: Notification, ev: Event) => any) | null;
+ onerror: ((this: Notification, ev: Event) => any) | null;
+ onshow: ((this: Notification, ev: Event) => any) | null;
+ readonly renotify: boolean;
+ readonly requireInteraction: boolean;
+ readonly silent: boolean;
+ readonly tag: string;
+ readonly timestamp: number;
+ readonly title: string;
+ readonly vibrate: ReadonlyArray<number>;
+ close(): void;
+ addEventListener<K extends keyof NotificationEventMap>(type: K, listener: (this: Notification, ev: NotificationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof NotificationEventMap>(type: K, listener: (this: Notification, ev: NotificationEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var Notification: {
+ prototype: Notification;
+ new(title: string, options?: NotificationOptions): Notification;
+ readonly maxActions: number;
+ readonly permission: NotificationPermission;
+};
+
+/** The parameter passed into the onnotificationclick handler, the NotificationEvent interface represents a notification click event that is dispatched on the ServiceWorkerGlobalScope of a ServiceWorker. */
+interface NotificationEvent extends ExtendableEvent {
+ readonly action: string;
+ readonly notification: Notification;
+}
+
+declare var NotificationEvent: {
+ prototype: NotificationEvent;
+ new(type: string, eventInitDict: NotificationEventInit): NotificationEvent;
+};
+
+/** The OES_element_index_uint extension is part of the WebGL API and adds support for gl.UNSIGNED_INT types to WebGLRenderingContext.drawElements(). */
+interface OES_element_index_uint {
+}
+
+/** The OES_standard_derivatives extension is part of the WebGL API and adds the GLSL derivative functions dFdx, dFdy, and fwidth. */
+interface OES_standard_derivatives {
+ readonly FRAGMENT_SHADER_DERIVATIVE_HINT_OES: GLenum;
+}
+
+/** The OES_texture_float extension is part of the WebGL API and exposes floating-point pixel types for textures. */
+interface OES_texture_float {
+}
+
+/** The OES_texture_float_linear extension is part of the WebGL API and allows linear filtering with floating-point pixel types for textures. */
+interface OES_texture_float_linear {
+}
+
+/** The OES_texture_half_float extension is part of the WebGL API and adds texture formats with 16- (aka half float) and 32-bit floating-point components. */
+interface OES_texture_half_float {
+ readonly HALF_FLOAT_OES: GLenum;
+}
+
+/** The OES_texture_half_float_linear extension is part of the WebGL API and allows linear filtering with half floating-point pixel types for textures. */
+interface OES_texture_half_float_linear {
+}
+
+interface OES_vertex_array_object {
+ bindVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): void;
+ createVertexArrayOES(): WebGLVertexArrayObjectOES | null;
+ deleteVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): void;
+ isVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): GLboolean;
+ readonly VERTEX_ARRAY_BINDING_OES: GLenum;
+}
+
+interface OffscreenCanvas extends EventTarget {
+ /**
+ * These attributes return the dimensions of the OffscreenCanvas object's bitmap.
+ *
+ * They can be set, to replace the bitmap with a new, transparent black bitmap of the specified dimensions (effectively resizing it).
+ */
+ height: number;
+ /**
+ * These attributes return the dimensions of the OffscreenCanvas object's bitmap.
+ *
+ * They can be set, to replace the bitmap with a new, transparent black bitmap of the specified dimensions (effectively resizing it).
+ */
+ width: number;
+ /**
+ * Returns a promise that will fulfill with a new Blob object representing a file containing the image in the OffscreenCanvas object.
+ *
+ * The argument, if provided, is a dictionary that controls the encoding options of the image file to be created. The type field specifies the file format and has a default value of "image/png"; that type is also used if the requested type isn't supported. If the image format supports variable quality (such as "image/jpeg"), then the quality field is a number in the range 0.0 to 1.0 inclusive indicating the desired quality level for the resulting image.
+ */
+ convertToBlob(options?: ImageEncodeOptions): Promise<Blob>;
+ /**
+ * Returns an object that exposes an API for drawing on the OffscreenCanvas object. contextId specifies the desired API: "2d", "bitmaprenderer", "webgl", or "webgl2". options is handled by that API.
+ *
+ * This specification defines the "2d" context below, which is similar but distinct from the "2d" context that is created from a canvas element. The WebGL specifications define the "webgl" and "webgl2" contexts. [WEBGL]
+ *
+ * Returns null if the canvas has already been initialized with another context type (e.g., trying to get a "2d" context after getting a "webgl" context).
+ */
+ getContext(contextId: "2d", options?: CanvasRenderingContext2DSettings): OffscreenCanvasRenderingContext2D | null;
+ getContext(contextId: "bitmaprenderer", options?: ImageBitmapRenderingContextSettings): ImageBitmapRenderingContext | null;
+ getContext(contextId: "webgl", options?: WebGLContextAttributes): WebGLRenderingContext | null;
+ getContext(contextId: "webgl2", options?: WebGLContextAttributes): WebGL2RenderingContext | null;
+ getContext(contextId: OffscreenRenderingContextId, options?: any): OffscreenRenderingContext | null;
+ /**
+ * Returns a newly created ImageBitmap object with the image in the OffscreenCanvas object. The image in the OffscreenCanvas object is replaced with a new blank image.
+ */
+ transferToImageBitmap(): ImageBitmap;
+}
+
+declare var OffscreenCanvas: {
+ prototype: OffscreenCanvas;
+ new(width: number, height: number): OffscreenCanvas;
+};
+
+interface OffscreenCanvasRenderingContext2D extends CanvasCompositing, CanvasDrawImage, CanvasDrawPath, CanvasFillStrokeStyles, CanvasFilters, CanvasImageData, CanvasImageSmoothing, CanvasPath, CanvasPathDrawingStyles, CanvasRect, CanvasShadowStyles, CanvasState, CanvasText, CanvasTextDrawingStyles, CanvasTransform {
+ readonly canvas: OffscreenCanvas;
+ commit(): void;
+}
+
+declare var OffscreenCanvasRenderingContext2D: {
+ prototype: OffscreenCanvasRenderingContext2D;
+ new(): OffscreenCanvasRenderingContext2D;
+};
+
+/** This Canvas 2D API interface is used to declare a path that can then be used on a CanvasRenderingContext2D object. The path methods of the CanvasRenderingContext2D interface are also present on this interface, which gives you the convenience of being able to retain and replay your path whenever desired. */
+interface Path2D extends CanvasPath {
+ /**
+ * Adds to the path the path given by the argument.
+ */
+ addPath(path: Path2D, transform?: DOMMatrix2DInit): void;
+}
+
+declare var Path2D: {
+ prototype: Path2D;
+ new(path?: Path2D | string): Path2D;
+};
+
+interface PerformanceEventMap {
+ "resourcetimingbufferfull": Event;
+}
+
+/** Provides access to performance-related information for the current page. It's part of the High Resolution Time API, but is enhanced by the Performance Timeline API, the Navigation Timing API, the User Timing API, and the Resource Timing API. */
+interface Performance extends EventTarget {
+ onresourcetimingbufferfull: ((this: Performance, ev: Event) => any) | null;
+ readonly timeOrigin: number;
+ clearMarks(markName?: string): void;
+ clearMeasures(measureName?: string): void;
+ clearResourceTimings(): void;
+ getEntries(): PerformanceEntryList;
+ getEntriesByName(name: string, type?: string): PerformanceEntryList;
+ getEntriesByType(type: string): PerformanceEntryList;
+ mark(markName: string): void;
+ measure(measureName: string, startMark?: string, endMark?: string): void;
+ now(): number;
+ setResourceTimingBufferSize(maxSize: number): void;
+ toJSON(): any;
+ addEventListener<K extends keyof PerformanceEventMap>(type: K, listener: (this: Performance, ev: PerformanceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof PerformanceEventMap>(type: K, listener: (this: Performance, ev: PerformanceEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var Performance: {
+ prototype: Performance;
+ new(): Performance;
+};
+
+/** Encapsulates a single performance metric that is part of the performance timeline. A performance entry can be directly created by making a performance mark or measure (for example by calling the mark() method) at an explicit point in an application. Performance entries are also created in indirect ways such as loading a resource (such as an image). */
+interface PerformanceEntry {
+ readonly duration: number;
+ readonly entryType: string;
+ readonly name: string;
+ readonly startTime: number;
+ toJSON(): any;
+}
+
+declare var PerformanceEntry: {
+ prototype: PerformanceEntry;
+ new(): PerformanceEntry;
+};
+
+/** PerformanceMark is an abstract interface for PerformanceEntry objects with an entryType of "mark". Entries of this type are created by calling performance.mark() to add a named DOMHighResTimeStamp (the mark) to the browser's performance timeline. */
+interface PerformanceMark extends PerformanceEntry {
+}
+
+declare var PerformanceMark: {
+ prototype: PerformanceMark;
+ new(): PerformanceMark;
+};
+
+/** PerformanceMeasure is an abstract interface for PerformanceEntry objects with an entryType of "measure". Entries of this type are created by calling performance.measure() to add a named DOMHighResTimeStamp (the measure) between two marks to the browser's performance timeline. */
+interface PerformanceMeasure extends PerformanceEntry {
+}
+
+declare var PerformanceMeasure: {
+ prototype: PerformanceMeasure;
+ new(): PerformanceMeasure;
+};
+
+interface PerformanceObserver {
+ disconnect(): void;
+ observe(options?: PerformanceObserverInit): void;
+ takeRecords(): PerformanceEntryList;
+}
+
+declare var PerformanceObserver: {
+ prototype: PerformanceObserver;
+ new(callback: PerformanceObserverCallback): PerformanceObserver;
+ readonly supportedEntryTypes: ReadonlyArray<string>;
+};
+
+interface PerformanceObserverEntryList {
+ getEntries(): PerformanceEntryList;
+ getEntriesByName(name: string, type?: string): PerformanceEntryList;
+ getEntriesByType(type: string): PerformanceEntryList;
+}
+
+declare var PerformanceObserverEntryList: {
+ prototype: PerformanceObserverEntryList;
+ new(): PerformanceObserverEntryList;
+};
+
+/** Enables retrieval and analysis of detailed network timing data regarding the loading of an application's resources. An application can use the timing metrics to determine, for example, the length of time it takes to fetch a specific resource, such as an XMLHttpRequest, <SVG>, image, or script. */
+interface PerformanceResourceTiming extends PerformanceEntry {
+ readonly connectEnd: number;
+ readonly connectStart: number;
+ readonly decodedBodySize: number;
+ readonly domainLookupEnd: number;
+ readonly domainLookupStart: number;
+ readonly encodedBodySize: number;
+ readonly fetchStart: number;
+ readonly initiatorType: string;
+ readonly nextHopProtocol: string;
+ readonly redirectEnd: number;
+ readonly redirectStart: number;
+ readonly requestStart: number;
+ readonly responseEnd: number;
+ readonly responseStart: number;
+ readonly secureConnectionStart: number;
+ readonly transferSize: number;
+ readonly workerStart: number;
+ toJSON(): any;
+}
+
+declare var PerformanceResourceTiming: {
+ prototype: PerformanceResourceTiming;
+ new(): PerformanceResourceTiming;
+};
+
+interface PermissionStatusEventMap {
+ "change": Event;
+}
+
+interface PermissionStatus extends EventTarget {
+ onchange: ((this: PermissionStatus, ev: Event) => any) | null;
+ readonly state: PermissionState;
+ addEventListener<K extends keyof PermissionStatusEventMap>(type: K, listener: (this: PermissionStatus, ev: PermissionStatusEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof PermissionStatusEventMap>(type: K, listener: (this: PermissionStatus, ev: PermissionStatusEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var PermissionStatus: {
+ prototype: PermissionStatus;
+ new(): PermissionStatus;
+};
+
+interface Permissions {
+ query(permissionDesc: PermissionDescriptor | DevicePermissionDescriptor | MidiPermissionDescriptor | PushPermissionDescriptor): Promise<PermissionStatus>;
+}
+
+declare var Permissions: {
+ prototype: Permissions;
+ new(): Permissions;
+};
+
+/** Events measuring progress of an underlying process, like an HTTP request (for an XMLHttpRequest, or the loading of the underlying resource of an <img>, <audio>, <video>, <style> or <link>). */
+interface ProgressEvent<T extends EventTarget = EventTarget> extends Event {
+ readonly lengthComputable: boolean;
+ readonly loaded: number;
+ readonly target: T | null;
+ readonly total: number;
+}
+
+declare var ProgressEvent: {
+ prototype: ProgressEvent;
+ new(type: string, eventInitDict?: ProgressEventInit): ProgressEvent;
+};
+
+interface PromiseRejectionEvent extends Event {
+ readonly promise: Promise<any>;
+ readonly reason: any;
+}
+
+declare var PromiseRejectionEvent: {
+ prototype: PromiseRejectionEvent;
+ new(type: string, eventInitDict: PromiseRejectionEventInit): PromiseRejectionEvent;
+};
+
+/** This Push API interface represents a push message that has been received. This event is sent to the global scope of a ServiceWorker. It contains the information sent from an application server to a PushSubscription. */
+interface PushEvent extends ExtendableEvent {
+ readonly data: PushMessageData | null;
+}
+
+declare var PushEvent: {
+ prototype: PushEvent;
+ new(type: string, eventInitDict?: PushEventInit): PushEvent;
+};
+
+/** This Push API interface provides a way to receive notifications from third-party servers as well as request URLs for push notifications. */
+interface PushManager {
+ getSubscription(): Promise<PushSubscription | null>;
+ permissionState(options?: PushSubscriptionOptionsInit): Promise<PushPermissionState>;
+ subscribe(options?: PushSubscriptionOptionsInit): Promise<PushSubscription>;
+}
+
+declare var PushManager: {
+ prototype: PushManager;
+ new(): PushManager;
+ readonly supportedContentEncodings: ReadonlyArray<string>;
+};
+
+/** This Push API interface provides methods which let you retrieve the push data sent by a server in various formats. */
+interface PushMessageData {
+ arrayBuffer(): ArrayBuffer;
+ blob(): Blob;
+ json(): any;
+ text(): string;
+}
+
+declare var PushMessageData: {
+ prototype: PushMessageData;
+ new(): PushMessageData;
+};
+
+/** This Push API interface provides a subcription's URL endpoint and allows unsubscription from a push service. */
+interface PushSubscription {
+ readonly endpoint: string;
+ readonly expirationTime: number | null;
+ readonly options: PushSubscriptionOptions;
+ getKey(name: PushEncryptionKeyName): ArrayBuffer | null;
+ toJSON(): PushSubscriptionJSON;
+ unsubscribe(): Promise<boolean>;
+}
+
+declare var PushSubscription: {
+ prototype: PushSubscription;
+ new(): PushSubscription;
+};
+
+interface PushSubscriptionChangeEvent extends ExtendableEvent {
+ readonly newSubscription: PushSubscription | null;
+ readonly oldSubscription: PushSubscription | null;
+}
+
+declare var PushSubscriptionChangeEvent: {
+ prototype: PushSubscriptionChangeEvent;
+ new(type: string, eventInitDict?: PushSubscriptionChangeEventInit): PushSubscriptionChangeEvent;
+};
+
+interface PushSubscriptionOptions {
+ readonly applicationServerKey: ArrayBuffer | null;
+ readonly userVisibleOnly: boolean;
+}
+
+declare var PushSubscriptionOptions: {
+ prototype: PushSubscriptionOptions;
+ new(): PushSubscriptionOptions;
+};
+
+interface ReadableByteStreamController {
+ readonly byobRequest: ReadableStreamBYOBRequest | undefined;
+ readonly desiredSize: number | null;
+ close(): void;
+ enqueue(chunk: ArrayBufferView): void;
+ error(error?: any): void;
+}
+
+/** This Streams API interface 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. */
+interface ReadableStream<R = any> {
+ readonly locked: boolean;
+ cancel(reason?: any): Promise<void>;
+ getReader(options: { mode: "byob" }): ReadableStreamBYOBReader;
+ getReader(): ReadableStreamDefaultReader<R>;
+ pipeThrough<T>({ writable, readable }: { writable: WritableStream<R>, readable: ReadableStream<T> }, options?: PipeOptions): ReadableStream<T>;
+ pipeTo(dest: WritableStream<R>, options?: PipeOptions): Promise<void>;
+ tee(): [ReadableStream<R>, ReadableStream<R>];
+}
+
+declare var ReadableStream: {
+ prototype: ReadableStream;
+ new(underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number, size?: undefined }): ReadableStream<Uint8Array>;
+ new<R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
+};
+
+interface ReadableStreamBYOBReader {
+ readonly closed: Promise<void>;
+ cancel(reason?: any): Promise<void>;
+ read<T extends ArrayBufferView>(view: T): Promise<ReadableStreamReadResult<T>>;
+ releaseLock(): void;
+}
+
+interface ReadableStreamBYOBRequest {
+ readonly view: ArrayBufferView;
+ respond(bytesWritten: number): void;
+ respondWithNewView(view: ArrayBufferView): void;
+}
+
+interface ReadableStreamDefaultController<R = any> {
+ readonly desiredSize: number | null;
+ close(): void;
+ enqueue(chunk: R): void;
+ error(error?: any): void;
+}
+
+interface ReadableStreamDefaultReader<R = any> {
+ readonly closed: Promise<void>;
+ cancel(reason?: any): Promise<void>;
+ read(): Promise<ReadableStreamReadResult<R>>;
+ releaseLock(): void;
+}
+
+interface ReadableStreamReader<R = any> {
+ cancel(): Promise<void>;
+ read(): Promise<ReadableStreamReadResult<R>>;
+ releaseLock(): void;
+}
+
+declare var ReadableStreamReader: {
+ prototype: ReadableStreamReader;
+ new(): ReadableStreamReader;
+};
+
+/** This Fetch API interface represents a resource request. */
+interface Request extends Body {
+ /**
+ * Returns the cache mode associated with request, which is a string indicating how the request will interact with the browser's cache when fetching.
+ */
+ readonly cache: RequestCache;
+ /**
+ * Returns the credentials mode associated with request, which is a string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL.
+ */
+ readonly credentials: RequestCredentials;
+ /**
+ * Returns the kind of resource requested by request, e.g., "document" or "script".
+ */
+ readonly destination: RequestDestination;
+ /**
+ * Returns a Headers object consisting of the headers associated with request. Note that headers added in the network layer by the user agent will not be accounted for in this object, e.g., the "Host" header.
+ */
+ readonly headers: Headers;
+ /**
+ * Returns request's subresource integrity metadata, which is a cryptographic hash of the resource being fetched. Its value consists of multiple hashes separated by whitespace. [SRI]
+ */
+ readonly integrity: string;
+ /**
+ * Returns a boolean indicating whether or not request is for a history navigation (a.k.a. back-foward navigation).
+ */
+ readonly isHistoryNavigation: boolean;
+ /**
+ * Returns a boolean indicating whether or not request is for a reload navigation.
+ */
+ readonly isReloadNavigation: boolean;
+ /**
+ * Returns a boolean indicating whether or not request can outlive the global in which it was created.
+ */
+ readonly keepalive: boolean;
+ /**
+ * Returns request's HTTP method, which is "GET" by default.
+ */
+ readonly method: string;
+ /**
+ * Returns the mode associated with request, which is a string indicating whether the request will use CORS, or will be restricted to same-origin URLs.
+ */
+ readonly mode: RequestMode;
+ /**
+ * Returns the redirect mode associated with request, which is a string indicating how redirects for the request will be handled during fetching. A request will follow redirects by default.
+ */
+ readonly redirect: RequestRedirect;
+ /**
+ * Returns the referrer of request. Its value can be a same-origin URL if explicitly set in init, the empty string to indicate no referrer, and "about:client" when defaulting to the global's default. This is used during fetching to determine the value of the `Referer` header of the request being made.
+ */
+ readonly referrer: string;
+ /**
+ * Returns the referrer policy associated with request. This is used during fetching to compute the value of the request's referrer.
+ */
+ readonly referrerPolicy: ReferrerPolicy;
+ /**
+ * Returns the signal associated with request, which is an AbortSignal object indicating whether or not request has been aborted, and its abort event handler.
+ */
+ readonly signal: AbortSignal;
+ /**
+ * Returns the URL of request as a string.
+ */
+ readonly url: string;
+ clone(): Request;
+}
+
+declare var Request: {
+ prototype: Request;
+ new(input: RequestInfo, init?: RequestInit): Request;
+};
+
+/** This Fetch API interface represents the response to a request. */
+interface Response extends Body {
+ readonly headers: Headers;
+ readonly ok: boolean;
+ readonly redirected: boolean;
+ readonly status: number;
+ readonly statusText: string;
+ readonly trailer: Promise<Headers>;
+ readonly type: ResponseType;
+ readonly url: string;
+ clone(): Response;
+}
+
+declare var Response: {
+ prototype: Response;
+ new(body?: BodyInit | null, init?: ResponseInit): Response;
+ error(): Response;
+ redirect(url: string, status?: number): Response;
+};
+
+interface ServiceWorkerEventMap extends AbstractWorkerEventMap {
+ "statechange": Event;
+}
+
+/** This ServiceWorker API interface provides a reference to a service worker. Multiple browsing contexts (e.g. pages, workers, etc.) can be associated with the same service worker, each through a unique ServiceWorker object. */
+interface ServiceWorker extends EventTarget, AbstractWorker {
+ onstatechange: ((this: ServiceWorker, ev: Event) => any) | null;
+ readonly scriptURL: string;
+ readonly state: ServiceWorkerState;
+ postMessage(message: any, transfer: Transferable[]): void;
+ postMessage(message: any, options?: PostMessageOptions): void;
+ addEventListener<K extends keyof ServiceWorkerEventMap>(type: K, listener: (this: ServiceWorker, ev: ServiceWorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof ServiceWorkerEventMap>(type: K, listener: (this: ServiceWorker, ev: ServiceWorkerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var ServiceWorker: {
+ prototype: ServiceWorker;
+ new(): ServiceWorker;
+};
+
+interface ServiceWorkerContainerEventMap {
+ "controllerchange": Event;
+ "message": MessageEvent;
+ "messageerror": MessageEvent;
+}
+
+/** The ServiceWorkerContainer interface of the ServiceWorker API provides an object representing the service worker as an overall unit in the network ecosystem, including facilities to register, unregister and update service workers, and access the state of service workers and their registrations. */
+interface ServiceWorkerContainer extends EventTarget {
+ readonly controller: ServiceWorker | null;
+ oncontrollerchange: ((this: ServiceWorkerContainer, ev: Event) => any) | null;
+ onmessage: ((this: ServiceWorkerContainer, ev: MessageEvent) => any) | null;
+ onmessageerror: ((this: ServiceWorkerContainer, ev: MessageEvent) => any) | null;
+ readonly ready: Promise<ServiceWorkerRegistration>;
+ getRegistration(clientURL?: string): Promise<ServiceWorkerRegistration | undefined>;
+ getRegistrations(): Promise<ReadonlyArray<ServiceWorkerRegistration>>;
+ register(scriptURL: string, options?: RegistrationOptions): Promise<ServiceWorkerRegistration>;
+ startMessages(): void;
+ addEventListener<K extends keyof ServiceWorkerContainerEventMap>(type: K, listener: (this: ServiceWorkerContainer, ev: ServiceWorkerContainerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof ServiceWorkerContainerEventMap>(type: K, listener: (this: ServiceWorkerContainer, ev: ServiceWorkerContainerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var ServiceWorkerContainer: {
+ prototype: ServiceWorkerContainer;
+ new(): ServiceWorkerContainer;
+};
+
+interface ServiceWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap {
+ "activate": ExtendableEvent;
+ "fetch": FetchEvent;
+ "install": ExtendableEvent;
+ "message": ExtendableMessageEvent;
+ "messageerror": MessageEvent;
+ "notificationclick": NotificationEvent;
+ "notificationclose": NotificationEvent;
+ "push": PushEvent;
+ "pushsubscriptionchange": PushSubscriptionChangeEvent;
+ "sync": SyncEvent;
+}
+
+/** This ServiceWorker API interface represents the global execution context of a service worker. */
+interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
+ readonly clients: Clients;
+ onactivate: ((this: ServiceWorkerGlobalScope, ev: ExtendableEvent) => any) | null;
+ onfetch: ((this: ServiceWorkerGlobalScope, ev: FetchEvent) => any) | null;
+ oninstall: ((this: ServiceWorkerGlobalScope, ev: ExtendableEvent) => any) | null;
+ onmessage: ((this: ServiceWorkerGlobalScope, ev: ExtendableMessageEvent) => any) | null;
+ onmessageerror: ((this: ServiceWorkerGlobalScope, ev: MessageEvent) => any) | null;
+ onnotificationclick: ((this: ServiceWorkerGlobalScope, ev: NotificationEvent) => any) | null;
+ onnotificationclose: ((this: ServiceWorkerGlobalScope, ev: NotificationEvent) => any) | null;
+ onpush: ((this: ServiceWorkerGlobalScope, ev: PushEvent) => any) | null;
+ onpushsubscriptionchange: ((this: ServiceWorkerGlobalScope, ev: PushSubscriptionChangeEvent) => any) | null;
+ onsync: ((this: ServiceWorkerGlobalScope, ev: SyncEvent) => any) | null;
+ readonly registration: ServiceWorkerRegistration;
+ readonly serviceWorker: ServiceWorker;
+ skipWaiting(): Promise<void>;
+ addEventListener<K extends keyof ServiceWorkerGlobalScopeEventMap>(type: K, listener: (this: ServiceWorkerGlobalScope, ev: ServiceWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof ServiceWorkerGlobalScopeEventMap>(type: K, listener: (this: ServiceWorkerGlobalScope, ev: ServiceWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var ServiceWorkerGlobalScope: {
+ prototype: ServiceWorkerGlobalScope;
+ new(): ServiceWorkerGlobalScope;
+};
+
+interface ServiceWorkerRegistrationEventMap {
+ "updatefound": Event;
+}
+
+/** This ServiceWorker API interface represents the service worker registration. You register a service worker to control one or more pages that share the same origin. */
+interface ServiceWorkerRegistration extends EventTarget {
+ readonly active: ServiceWorker | null;
+ readonly installing: ServiceWorker | null;
+ readonly navigationPreload: NavigationPreloadManager;
+ onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null;
+ readonly pushManager: PushManager;
+ readonly scope: string;
+ readonly sync: SyncManager;
+ readonly updateViaCache: ServiceWorkerUpdateViaCache;
+ readonly waiting: ServiceWorker | null;
+ getNotifications(filter?: GetNotificationOptions): Promise<Notification[]>;
+ showNotification(title: string, options?: NotificationOptions): Promise<void>;
+ unregister(): Promise<boolean>;
+ update(): Promise<void>;
+ addEventListener<K extends keyof ServiceWorkerRegistrationEventMap>(type: K, listener: (this: ServiceWorkerRegistration, ev: ServiceWorkerRegistrationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof ServiceWorkerRegistrationEventMap>(type: K, listener: (this: ServiceWorkerRegistration, ev: ServiceWorkerRegistrationEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var ServiceWorkerRegistration: {
+ prototype: ServiceWorkerRegistration;
+ new(): ServiceWorkerRegistration;
+};
+
+interface SharedWorker extends EventTarget, AbstractWorker {
+ /**
+ * Returns sharedWorker's MessagePort object which can be used to communicate with the global environment.
+ */
+ readonly port: MessagePort;
+ addEventListener<K extends keyof AbstractWorkerEventMap>(type: K, listener: (this: SharedWorker, ev: AbstractWorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof AbstractWorkerEventMap>(type: K, listener: (this: SharedWorker, ev: AbstractWorkerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SharedWorker: {
+ prototype: SharedWorker;
+ new(scriptURL: string, options?: string | WorkerOptions): SharedWorker;
+};
+
+interface SharedWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap {
+ "connect": MessageEvent;
+}
+
+interface SharedWorkerGlobalScope extends WorkerGlobalScope {
+ /**
+ * Returns sharedWorkerGlobal's name, i.e. the value given to the SharedWorker constructor. Multiple SharedWorker objects can correspond to the same shared worker (and SharedWorkerGlobalScope), by reusing the same name.
+ */
+ readonly name: string;
+ onconnect: ((this: SharedWorkerGlobalScope, ev: MessageEvent) => any) | null;
+ /**
+ * Aborts sharedWorkerGlobal.
+ */
+ close(): void;
+ addEventListener<K extends keyof SharedWorkerGlobalScopeEventMap>(type: K, listener: (this: SharedWorkerGlobalScope, ev: SharedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof SharedWorkerGlobalScopeEventMap>(type: K, listener: (this: SharedWorkerGlobalScope, ev: SharedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var SharedWorkerGlobalScope: {
+ prototype: SharedWorkerGlobalScope;
+ new(): SharedWorkerGlobalScope;
+};
+
+interface StorageManager {
+ estimate(): Promise<StorageEstimate>;
+ persisted(): Promise<boolean>;
+}
+
+declare var StorageManager: {
+ prototype: StorageManager;
+ new(): StorageManager;
+};
+
+/** This Web Crypto API interface provides a number of low-level cryptographic functions. It is accessed via the Crypto.subtle properties available in a window context (via Window.crypto). */
+interface SubtleCrypto {
+ decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): PromiseLike<ArrayBuffer>;
+ deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, length: number): PromiseLike<ArrayBuffer>;
+ deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: string | AesDerivedKeyParams | HmacImportParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): PromiseLike<CryptoKey>;
+ digest(algorithm: AlgorithmIdentifier, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): PromiseLike<ArrayBuffer>;
+ encrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): PromiseLike<ArrayBuffer>;
+ exportKey(format: "jwk", key: CryptoKey): PromiseLike<JsonWebKey>;
+ exportKey(format: "raw" | "pkcs8" | "spki", key: CryptoKey): PromiseLike<ArrayBuffer>;
+ exportKey(format: string, key: CryptoKey): PromiseLike<JsonWebKey | ArrayBuffer>;
+ generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): PromiseLike<CryptoKeyPair | CryptoKey>;
+ generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams | DhKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): PromiseLike<CryptoKeyPair>;
+ generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): PromiseLike<CryptoKey>;
+ importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): PromiseLike<CryptoKey>;
+ importKey(format: "raw" | "pkcs8" | "spki", keyData: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): PromiseLike<CryptoKey>;
+ importKey(format: string, keyData: JsonWebKey | Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): PromiseLike<CryptoKey>;
+ sign(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | AesCmacParams, key: CryptoKey, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): PromiseLike<ArrayBuffer>;
+ unwrapKey(format: "raw" | "pkcs8" | "spki" | "jwk" | string, wrappedKey: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): PromiseLike<CryptoKey>;
+ verify(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | AesCmacParams, key: CryptoKey, signature: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): PromiseLike<boolean>;
+ wrapKey(format: "raw" | "pkcs8" | "spki" | "jwk" | string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams): PromiseLike<ArrayBuffer>;
+}
+
+declare var SubtleCrypto: {
+ prototype: SubtleCrypto;
+ new(): SubtleCrypto;
+};
+
+/** A sync action that is dispatched on the ServiceWorkerGlobalScope of a ServiceWorker.  */
+interface SyncEvent extends ExtendableEvent {
+ readonly lastChance: boolean;
+ readonly tag: string;
+}
+
+declare var SyncEvent: {
+ prototype: SyncEvent;
+ new(type: string, init: SyncEventInit): SyncEvent;
+};
+
+/** This ServiceWorker API interface provides an interface for registering and listing sync registrations. */
+interface SyncManager {
+ getTags(): Promise<string[]>;
+ register(tag: string): Promise<void>;
+}
+
+declare var SyncManager: {
+ prototype: SyncManager;
+ new(): SyncManager;
+};
+
+/** A decoder for a specific method, that is a specific character encoding, like utf-8, iso-8859-2, koi8, cp1261, gbk, etc. A decoder takes a stream of bytes as input and emits a stream of code points. For a more scalable, non-native library, see StringView – a C-like representation of strings based on typed arrays. */
+interface TextDecoder extends TextDecoderCommon {
+ /**
+ * Returns the result of running encoding's decoder. The method can be invoked zero or more times with options's stream set to true, and then once without options's stream (or set to false), to process a fragmented stream. If the invocation without options's stream (or set to false) has no input, it's clearest to omit both arguments.
+ *
+ * ```
+ * var string = "", decoder = new TextDecoder(encoding), buffer;
+ * while(buffer = next_chunk()) {
+ * string += decoder.decode(buffer, {stream:true});
+ * }
+ * string += decoder.decode(); // end-of-stream
+ * ```
+ *
+ * If the error mode is "fatal" and encoding's decoder returns error, throws a TypeError.
+ */
+ decode(input?: BufferSource, options?: TextDecodeOptions): string;
+}
+
+declare var TextDecoder: {
+ prototype: TextDecoder;
+ new(label?: string, options?: TextDecoderOptions): TextDecoder;
+};
+
+interface TextDecoderCommon {
+ /**
+ * Returns encoding's name, lowercased.
+ */
+ readonly encoding: string;
+ /**
+ * Returns true if error mode is "fatal", and false otherwise.
+ */
+ readonly fatal: boolean;
+ /**
+ * Returns true if ignore BOM flag is set, and false otherwise.
+ */
+ readonly ignoreBOM: boolean;
+}
+
+interface TextDecoderStream extends GenericTransformStream, TextDecoderCommon {
+ readonly readable: ReadableStream<string>;
+ readonly writable: WritableStream<BufferSource>;
+}
+
+declare var TextDecoderStream: {
+ prototype: TextDecoderStream;
+ new(label?: string, options?: TextDecoderOptions): TextDecoderStream;
+};
+
+/** TextEncoder takes a stream of code points as input and emits a stream of bytes. For a more scalable, non-native library, see StringView – a C-like representation of strings based on typed arrays. */
+interface TextEncoder extends TextEncoderCommon {
+ /**
+ * Returns the result of running UTF-8's encoder.
+ */
+ encode(input?: string): Uint8Array;
+ /**
+ * Runs the UTF-8 encoder on source, stores the result of that operation into destination, and returns the progress made as a dictionary whereby read is the number of converted code units of source and written is the number of bytes modified in destination.
+ */
+ encodeInto(source: string, destination: Uint8Array): TextEncoderEncodeIntoResult;
+}
+
+declare var TextEncoder: {
+ prototype: TextEncoder;
+ new(): TextEncoder;
+};
+
+interface TextEncoderCommon {
+ /**
+ * Returns "utf-8".
+ */
+ readonly encoding: string;
+}
+
+interface TextEncoderStream extends GenericTransformStream, TextEncoderCommon {
+ readonly readable: ReadableStream<Uint8Array>;
+ readonly writable: WritableStream<string>;
+}
+
+declare var TextEncoderStream: {
+ prototype: TextEncoderStream;
+ new(): TextEncoderStream;
+};
+
+/** The dimensions of a piece of text in the canvas, as created by the CanvasRenderingContext2D.measureText() method. */
+interface TextMetrics {
+ /**
+ * Returns the measurement described below.
+ */
+ readonly actualBoundingBoxAscent: number;
+ /**
+ * Returns the measurement described below.
+ */
+ readonly actualBoundingBoxDescent: number;
+ /**
+ * Returns the measurement described below.
+ */
+ readonly actualBoundingBoxLeft: number;
+ /**
+ * Returns the measurement described below.
+ */
+ readonly actualBoundingBoxRight: number;
+ /**
+ * Returns the measurement described below.
+ */
+ readonly alphabeticBaseline: number;
+ /**
+ * Returns the measurement described below.
+ */
+ readonly emHeightAscent: number;
+ /**
+ * Returns the measurement described below.
+ */
+ readonly emHeightDescent: number;
+ /**
+ * Returns the measurement described below.
+ */
+ readonly fontBoundingBoxAscent: number;
+ /**
+ * Returns the measurement described below.
+ */
+ readonly fontBoundingBoxDescent: number;
+ /**
+ * Returns the measurement described below.
+ */
+ readonly hangingBaseline: number;
+ /**
+ * Returns the measurement described below.
+ */
+ readonly ideographicBaseline: number;
+ /**
+ * Returns the measurement described below.
+ */
+ readonly width: number;
+}
+
+declare var TextMetrics: {
+ prototype: TextMetrics;
+ new(): TextMetrics;
+};
+
+interface TransformStream<I = any, O = any> {
+ readonly readable: ReadableStream<O>;
+ readonly writable: WritableStream<I>;
+}
+
+declare var TransformStream: {
+ prototype: TransformStream;
+ new<I = any, O = any>(transformer?: Transformer<I, O>, writableStrategy?: QueuingStrategy<I>, readableStrategy?: QueuingStrategy<O>): TransformStream<I, O>;
+};
+
+interface TransformStreamDefaultController<O = any> {
+ readonly desiredSize: number | null;
+ enqueue(chunk: O): void;
+ error(reason?: any): void;
+ terminate(): void;
+}
+
+/** The URL interface represents an object providing static methods used for creating object URLs. */
+interface URL {
+ hash: string;
+ host: string;
+ hostname: string;
+ href: string;
+ toString(): string;
+ readonly origin: string;
+ password: string;
+ pathname: string;
+ port: string;
+ protocol: string;
+ search: string;
+ readonly searchParams: URLSearchParams;
+ username: string;
+ toJSON(): string;
+}
+
+declare var URL: {
+ prototype: URL;
+ new(url: string, base?: string | URL): URL;
+ createObjectURL(object: any): string;
+ revokeObjectURL(url: string): void;
+};
+
+interface URLSearchParams {
+ /**
+ * Appends a specified key/value pair as a new search parameter.
+ */
+ append(name: string, value: string): void;
+ /**
+ * Deletes the given search parameter, and its associated value, from the list of all search parameters.
+ */
+ delete(name: string): void;
+ /**
+ * Returns the first value associated to the given search parameter.
+ */
+ get(name: string): string | null;
+ /**
+ * Returns all the values association with a given search parameter.
+ */
+ getAll(name: string): string[];
+ /**
+ * Returns a Boolean indicating if such a search parameter exists.
+ */
+ has(name: string): boolean;
+ /**
+ * Sets the value associated to a given search parameter to the given value. If there were several values, delete the others.
+ */
+ set(name: string, value: string): void;
+ sort(): void;
+ /**
+ * Returns a string containing a query string suitable for use in a URL. Does not include the question mark.
+ */
+ toString(): string;
+ forEach(callbackfn: (value: string, key: string, parent: URLSearchParams) => void, thisArg?: any): void;
+}
+
+declare var URLSearchParams: {
+ prototype: URLSearchParams;
+ new(init?: string[][] | Record<string, string> | string | URLSearchParams): URLSearchParams;
+ toString(): string;
+};
+
+interface WEBGL_color_buffer_float {
+ readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT: GLenum;
+ readonly RGBA32F_EXT: GLenum;
+ readonly UNSIGNED_NORMALIZED_EXT: GLenum;
+}
+
+interface WEBGL_compressed_texture_astc {
+ getSupportedProfiles(): string[];
+ readonly COMPRESSED_RGBA_ASTC_10x10_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_10x5_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_10x6_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_10x8_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_12x10_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_12x12_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_4x4_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_5x4_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_5x5_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_6x5_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_6x6_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_8x5_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_8x6_KHR: GLenum;
+ readonly COMPRESSED_RGBA_ASTC_8x8_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR: GLenum;
+ readonly COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR: GLenum;
+}
+
+/** The WEBGL_compressed_texture_s3tc extension is part of the WebGL API and exposes four S3TC compressed texture formats. */
+interface WEBGL_compressed_texture_s3tc {
+ readonly COMPRESSED_RGBA_S3TC_DXT1_EXT: GLenum;
+ readonly COMPRESSED_RGBA_S3TC_DXT3_EXT: GLenum;
+ readonly COMPRESSED_RGBA_S3TC_DXT5_EXT: GLenum;
+ readonly COMPRESSED_RGB_S3TC_DXT1_EXT: GLenum;
+}
+
+interface WEBGL_compressed_texture_s3tc_srgb {
+ readonly COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT: GLenum;
+ readonly COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT: GLenum;
+ readonly COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT: GLenum;
+ readonly COMPRESSED_SRGB_S3TC_DXT1_EXT: GLenum;
+}
+
+/** The WEBGL_debug_renderer_info extension is part of the WebGL API and exposes two constants with information about the graphics driver for debugging purposes. */
+interface WEBGL_debug_renderer_info {
+ readonly UNMASKED_RENDERER_WEBGL: GLenum;
+ readonly UNMASKED_VENDOR_WEBGL: GLenum;
+}
+
+interface WEBGL_debug_shaders {
+ getTranslatedShaderSource(shader: WebGLShader): string;
+}
+
+/** The WEBGL_depth_texture extension is part of the WebGL API and defines 2D depth and depth-stencil textures. */
+interface WEBGL_depth_texture {
+ readonly UNSIGNED_INT_24_8_WEBGL: GLenum;
+}
+
+interface WEBGL_draw_buffers {
+ drawBuffersWEBGL(buffers: GLenum[]): void;
+ readonly COLOR_ATTACHMENT0_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT10_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT11_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT12_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT13_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT14_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT15_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT1_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT2_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT3_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT4_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT5_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT6_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT7_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT8_WEBGL: GLenum;
+ readonly COLOR_ATTACHMENT9_WEBGL: GLenum;
+ readonly DRAW_BUFFER0_WEBGL: GLenum;
+ readonly DRAW_BUFFER10_WEBGL: GLenum;
+ readonly DRAW_BUFFER11_WEBGL: GLenum;
+ readonly DRAW_BUFFER12_WEBGL: GLenum;
+ readonly DRAW_BUFFER13_WEBGL: GLenum;
+ readonly DRAW_BUFFER14_WEBGL: GLenum;
+ readonly DRAW_BUFFER15_WEBGL: GLenum;
+ readonly DRAW_BUFFER1_WEBGL: GLenum;
+ readonly DRAW_BUFFER2_WEBGL: GLenum;
+ readonly DRAW_BUFFER3_WEBGL: GLenum;
+ readonly DRAW_BUFFER4_WEBGL: GLenum;
+ readonly DRAW_BUFFER5_WEBGL: GLenum;
+ readonly DRAW_BUFFER6_WEBGL: GLenum;
+ readonly DRAW_BUFFER7_WEBGL: GLenum;
+ readonly DRAW_BUFFER8_WEBGL: GLenum;
+ readonly DRAW_BUFFER9_WEBGL: GLenum;
+ readonly MAX_COLOR_ATTACHMENTS_WEBGL: GLenum;
+ readonly MAX_DRAW_BUFFERS_WEBGL: GLenum;
+}
+
+interface WEBGL_lose_context {
+ loseContext(): void;
+ restoreContext(): void;
+}
+
+interface WebGL2RenderingContext extends WebGL2RenderingContextBase, WebGL2RenderingContextOverloads, WebGLRenderingContextBase {
+}
+
+declare var WebGL2RenderingContext: {
+ prototype: WebGL2RenderingContext;
+ new(): WebGL2RenderingContext;
+ readonly ACTIVE_ATTRIBUTES: GLenum;
+ readonly ACTIVE_TEXTURE: GLenum;
+ readonly ACTIVE_UNIFORMS: GLenum;
+ readonly ALIASED_LINE_WIDTH_RANGE: GLenum;
+ readonly ALIASED_POINT_SIZE_RANGE: GLenum;
+ readonly ALPHA: GLenum;
+ readonly ALPHA_BITS: GLenum;
+ readonly ALWAYS: GLenum;
+ readonly ARRAY_BUFFER: GLenum;
+ readonly ARRAY_BUFFER_BINDING: GLenum;
+ readonly ATTACHED_SHADERS: GLenum;
+ readonly BACK: GLenum;
+ readonly BLEND: GLenum;
+ readonly BLEND_COLOR: GLenum;
+ readonly BLEND_DST_ALPHA: GLenum;
+ readonly BLEND_DST_RGB: GLenum;
+ readonly BLEND_EQUATION: GLenum;
+ readonly BLEND_EQUATION_ALPHA: GLenum;
+ readonly BLEND_EQUATION_RGB: GLenum;
+ readonly BLEND_SRC_ALPHA: GLenum;
+ readonly BLEND_SRC_RGB: GLenum;
+ readonly BLUE_BITS: GLenum;
+ readonly BOOL: GLenum;
+ readonly BOOL_VEC2: GLenum;
+ readonly BOOL_VEC3: GLenum;
+ readonly BOOL_VEC4: GLenum;
+ readonly BROWSER_DEFAULT_WEBGL: GLenum;
+ readonly BUFFER_SIZE: GLenum;
+ readonly BUFFER_USAGE: GLenum;
+ readonly BYTE: GLenum;
+ readonly CCW: GLenum;
+ readonly CLAMP_TO_EDGE: GLenum;
+ readonly COLOR_ATTACHMENT0: GLenum;
+ readonly COLOR_BUFFER_BIT: GLenum;
+ readonly COLOR_CLEAR_VALUE: GLenum;
+ readonly COLOR_WRITEMASK: GLenum;
+ readonly COMPILE_STATUS: GLenum;
+ readonly COMPRESSED_TEXTURE_FORMATS: GLenum;
+ readonly CONSTANT_ALPHA: GLenum;
+ readonly CONSTANT_COLOR: GLenum;
+ readonly CONTEXT_LOST_WEBGL: GLenum;
+ readonly CULL_FACE: GLenum;
+ readonly CULL_FACE_MODE: GLenum;
+ readonly CURRENT_PROGRAM: GLenum;
+ readonly CURRENT_VERTEX_ATTRIB: GLenum;
+ readonly CW: GLenum;
+ readonly DECR: GLenum;
+ readonly DECR_WRAP: GLenum;
+ readonly DELETE_STATUS: GLenum;
+ readonly DEPTH_ATTACHMENT: GLenum;
+ readonly DEPTH_BITS: GLenum;
+ readonly DEPTH_BUFFER_BIT: GLenum;
+ readonly DEPTH_CLEAR_VALUE: GLenum;
+ readonly DEPTH_COMPONENT: GLenum;
+ readonly DEPTH_COMPONENT16: GLenum;
+ readonly DEPTH_FUNC: GLenum;
+ readonly DEPTH_RANGE: GLenum;
+ readonly DEPTH_STENCIL: GLenum;
+ readonly DEPTH_STENCIL_ATTACHMENT: GLenum;
+ readonly DEPTH_TEST: GLenum;
+ readonly DEPTH_WRITEMASK: GLenum;
+ readonly DITHER: GLenum;
+ readonly DONT_CARE: GLenum;
+ readonly DST_ALPHA: GLenum;
+ readonly DST_COLOR: GLenum;
+ readonly DYNAMIC_DRAW: GLenum;
+ readonly ELEMENT_ARRAY_BUFFER: GLenum;
+ readonly ELEMENT_ARRAY_BUFFER_BINDING: GLenum;
+ readonly EQUAL: GLenum;
+ readonly FASTEST: GLenum;
+ readonly FLOAT: GLenum;
+ readonly FLOAT_MAT2: GLenum;
+ readonly FLOAT_MAT3: GLenum;
+ readonly FLOAT_MAT4: GLenum;
+ readonly FLOAT_VEC2: GLenum;
+ readonly FLOAT_VEC3: GLenum;
+ readonly FLOAT_VEC4: GLenum;
+ readonly FRAGMENT_SHADER: GLenum;
+ readonly FRAMEBUFFER: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: GLenum;
+ readonly FRAMEBUFFER_BINDING: GLenum;
+ readonly FRAMEBUFFER_COMPLETE: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: GLenum;
+ readonly FRAMEBUFFER_UNSUPPORTED: GLenum;
+ readonly FRONT: GLenum;
+ readonly FRONT_AND_BACK: GLenum;
+ readonly FRONT_FACE: GLenum;
+ readonly FUNC_ADD: GLenum;
+ readonly FUNC_REVERSE_SUBTRACT: GLenum;
+ readonly FUNC_SUBTRACT: GLenum;
+ readonly GENERATE_MIPMAP_HINT: GLenum;
+ readonly GEQUAL: GLenum;
+ readonly GREATER: GLenum;
+ readonly GREEN_BITS: GLenum;
+ readonly HIGH_FLOAT: GLenum;
+ readonly HIGH_INT: GLenum;
+ readonly IMPLEMENTATION_COLOR_READ_FORMAT: GLenum;
+ readonly IMPLEMENTATION_COLOR_READ_TYPE: GLenum;
+ readonly INCR: GLenum;
+ readonly INCR_WRAP: GLenum;
+ readonly INT: GLenum;
+ readonly INT_VEC2: GLenum;
+ readonly INT_VEC3: GLenum;
+ readonly INT_VEC4: GLenum;
+ readonly INVALID_ENUM: GLenum;
+ readonly INVALID_FRAMEBUFFER_OPERATION: GLenum;
+ readonly INVALID_OPERATION: GLenum;
+ readonly INVALID_VALUE: GLenum;
+ readonly INVERT: GLenum;
+ readonly KEEP: GLenum;
+ readonly LEQUAL: GLenum;
+ readonly LESS: GLenum;
+ readonly LINEAR: GLenum;
+ readonly LINEAR_MIPMAP_LINEAR: GLenum;
+ readonly LINEAR_MIPMAP_NEAREST: GLenum;
+ readonly LINES: GLenum;
+ readonly LINE_LOOP: GLenum;
+ readonly LINE_STRIP: GLenum;
+ readonly LINE_WIDTH: GLenum;
+ readonly LINK_STATUS: GLenum;
+ readonly LOW_FLOAT: GLenum;
+ readonly LOW_INT: GLenum;
+ readonly LUMINANCE: GLenum;
+ readonly LUMINANCE_ALPHA: GLenum;
+ readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: GLenum;
+ readonly MAX_CUBE_MAP_TEXTURE_SIZE: GLenum;
+ readonly MAX_FRAGMENT_UNIFORM_VECTORS: GLenum;
+ readonly MAX_RENDERBUFFER_SIZE: GLenum;
+ readonly MAX_TEXTURE_IMAGE_UNITS: GLenum;
+ readonly MAX_TEXTURE_SIZE: GLenum;
+ readonly MAX_VARYING_VECTORS: GLenum;
+ readonly MAX_VERTEX_ATTRIBS: GLenum;
+ readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: GLenum;
+ readonly MAX_VERTEX_UNIFORM_VECTORS: GLenum;
+ readonly MAX_VIEWPORT_DIMS: GLenum;
+ readonly MEDIUM_FLOAT: GLenum;
+ readonly MEDIUM_INT: GLenum;
+ readonly MIRRORED_REPEAT: GLenum;
+ readonly NEAREST: GLenum;
+ readonly NEAREST_MIPMAP_LINEAR: GLenum;
+ readonly NEAREST_MIPMAP_NEAREST: GLenum;
+ readonly NEVER: GLenum;
+ readonly NICEST: GLenum;
+ readonly NONE: GLenum;
+ readonly NOTEQUAL: GLenum;
+ readonly NO_ERROR: GLenum;
+ readonly ONE: GLenum;
+ readonly ONE_MINUS_CONSTANT_ALPHA: GLenum;
+ readonly ONE_MINUS_CONSTANT_COLOR: GLenum;
+ readonly ONE_MINUS_DST_ALPHA: GLenum;
+ readonly ONE_MINUS_DST_COLOR: GLenum;
+ readonly ONE_MINUS_SRC_ALPHA: GLenum;
+ readonly ONE_MINUS_SRC_COLOR: GLenum;
+ readonly OUT_OF_MEMORY: GLenum;
+ readonly PACK_ALIGNMENT: GLenum;
+ readonly POINTS: GLenum;
+ readonly POLYGON_OFFSET_FACTOR: GLenum;
+ readonly POLYGON_OFFSET_FILL: GLenum;
+ readonly POLYGON_OFFSET_UNITS: GLenum;
+ readonly RED_BITS: GLenum;
+ readonly RENDERBUFFER: GLenum;
+ readonly RENDERBUFFER_ALPHA_SIZE: GLenum;
+ readonly RENDERBUFFER_BINDING: GLenum;
+ readonly RENDERBUFFER_BLUE_SIZE: GLenum;
+ readonly RENDERBUFFER_DEPTH_SIZE: GLenum;
+ readonly RENDERBUFFER_GREEN_SIZE: GLenum;
+ readonly RENDERBUFFER_HEIGHT: GLenum;
+ readonly RENDERBUFFER_INTERNAL_FORMAT: GLenum;
+ readonly RENDERBUFFER_RED_SIZE: GLenum;
+ readonly RENDERBUFFER_STENCIL_SIZE: GLenum;
+ readonly RENDERBUFFER_WIDTH: GLenum;
+ readonly RENDERER: GLenum;
+ readonly REPEAT: GLenum;
+ readonly REPLACE: GLenum;
+ readonly RGB: GLenum;
+ readonly RGB565: GLenum;
+ readonly RGB5_A1: GLenum;
+ readonly RGBA: GLenum;
+ readonly RGBA4: GLenum;
+ readonly SAMPLER_2D: GLenum;
+ readonly SAMPLER_CUBE: GLenum;
+ readonly SAMPLES: GLenum;
+ readonly SAMPLE_ALPHA_TO_COVERAGE: GLenum;
+ readonly SAMPLE_BUFFERS: GLenum;
+ readonly SAMPLE_COVERAGE: GLenum;
+ readonly SAMPLE_COVERAGE_INVERT: GLenum;
+ readonly SAMPLE_COVERAGE_VALUE: GLenum;
+ readonly SCISSOR_BOX: GLenum;
+ readonly SCISSOR_TEST: GLenum;
+ readonly SHADER_TYPE: GLenum;
+ readonly SHADING_LANGUAGE_VERSION: GLenum;
+ readonly SHORT: GLenum;
+ readonly SRC_ALPHA: GLenum;
+ readonly SRC_ALPHA_SATURATE: GLenum;
+ readonly SRC_COLOR: GLenum;
+ readonly STATIC_DRAW: GLenum;
+ readonly STENCIL_ATTACHMENT: GLenum;
+ readonly STENCIL_BACK_FAIL: GLenum;
+ readonly STENCIL_BACK_FUNC: GLenum;
+ readonly STENCIL_BACK_PASS_DEPTH_FAIL: GLenum;
+ readonly STENCIL_BACK_PASS_DEPTH_PASS: GLenum;
+ readonly STENCIL_BACK_REF: GLenum;
+ readonly STENCIL_BACK_VALUE_MASK: GLenum;
+ readonly STENCIL_BACK_WRITEMASK: GLenum;
+ readonly STENCIL_BITS: GLenum;
+ readonly STENCIL_BUFFER_BIT: GLenum;
+ readonly STENCIL_CLEAR_VALUE: GLenum;
+ readonly STENCIL_FAIL: GLenum;
+ readonly STENCIL_FUNC: GLenum;
+ readonly STENCIL_INDEX8: GLenum;
+ readonly STENCIL_PASS_DEPTH_FAIL: GLenum;
+ readonly STENCIL_PASS_DEPTH_PASS: GLenum;
+ readonly STENCIL_REF: GLenum;
+ readonly STENCIL_TEST: GLenum;
+ readonly STENCIL_VALUE_MASK: GLenum;
+ readonly STENCIL_WRITEMASK: GLenum;
+ readonly STREAM_DRAW: GLenum;
+ readonly SUBPIXEL_BITS: GLenum;
+ readonly TEXTURE: GLenum;
+ readonly TEXTURE0: GLenum;
+ readonly TEXTURE1: GLenum;
+ readonly TEXTURE10: GLenum;
+ readonly TEXTURE11: GLenum;
+ readonly TEXTURE12: GLenum;
+ readonly TEXTURE13: GLenum;
+ readonly TEXTURE14: GLenum;
+ readonly TEXTURE15: GLenum;
+ readonly TEXTURE16: GLenum;
+ readonly TEXTURE17: GLenum;
+ readonly TEXTURE18: GLenum;
+ readonly TEXTURE19: GLenum;
+ readonly TEXTURE2: GLenum;
+ readonly TEXTURE20: GLenum;
+ readonly TEXTURE21: GLenum;
+ readonly TEXTURE22: GLenum;
+ readonly TEXTURE23: GLenum;
+ readonly TEXTURE24: GLenum;
+ readonly TEXTURE25: GLenum;
+ readonly TEXTURE26: GLenum;
+ readonly TEXTURE27: GLenum;
+ readonly TEXTURE28: GLenum;
+ readonly TEXTURE29: GLenum;
+ readonly TEXTURE3: GLenum;
+ readonly TEXTURE30: GLenum;
+ readonly TEXTURE31: GLenum;
+ readonly TEXTURE4: GLenum;
+ readonly TEXTURE5: GLenum;
+ readonly TEXTURE6: GLenum;
+ readonly TEXTURE7: GLenum;
+ readonly TEXTURE8: GLenum;
+ readonly TEXTURE9: GLenum;
+ readonly TEXTURE_2D: GLenum;
+ readonly TEXTURE_BINDING_2D: GLenum;
+ readonly TEXTURE_BINDING_CUBE_MAP: GLenum;
+ readonly TEXTURE_CUBE_MAP: GLenum;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_X: GLenum;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: GLenum;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: GLenum;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_X: GLenum;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_Y: GLenum;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_Z: GLenum;
+ readonly TEXTURE_MAG_FILTER: GLenum;
+ readonly TEXTURE_MIN_FILTER: GLenum;
+ readonly TEXTURE_WRAP_S: GLenum;
+ readonly TEXTURE_WRAP_T: GLenum;
+ readonly TRIANGLES: GLenum;
+ readonly TRIANGLE_FAN: GLenum;
+ readonly TRIANGLE_STRIP: GLenum;
+ readonly UNPACK_ALIGNMENT: GLenum;
+ readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: GLenum;
+ readonly UNPACK_FLIP_Y_WEBGL: GLenum;
+ readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: GLenum;
+ readonly UNSIGNED_BYTE: GLenum;
+ readonly UNSIGNED_INT: GLenum;
+ readonly UNSIGNED_SHORT: GLenum;
+ readonly UNSIGNED_SHORT_4_4_4_4: GLenum;
+ readonly UNSIGNED_SHORT_5_5_5_1: GLenum;
+ readonly UNSIGNED_SHORT_5_6_5: GLenum;
+ readonly VALIDATE_STATUS: GLenum;
+ readonly VENDOR: GLenum;
+ readonly VERSION: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_ENABLED: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_POINTER: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_SIZE: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_STRIDE: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_TYPE: GLenum;
+ readonly VERTEX_SHADER: GLenum;
+ readonly VIEWPORT: GLenum;
+ readonly ZERO: GLenum;
+ readonly ACTIVE_UNIFORM_BLOCKS: GLenum;
+ readonly ALREADY_SIGNALED: GLenum;
+ readonly ANY_SAMPLES_PASSED: GLenum;
+ readonly ANY_SAMPLES_PASSED_CONSERVATIVE: GLenum;
+ readonly COLOR: GLenum;
+ readonly COLOR_ATTACHMENT1: GLenum;
+ readonly COLOR_ATTACHMENT10: GLenum;
+ readonly COLOR_ATTACHMENT11: GLenum;
+ readonly COLOR_ATTACHMENT12: GLenum;
+ readonly COLOR_ATTACHMENT13: GLenum;
+ readonly COLOR_ATTACHMENT14: GLenum;
+ readonly COLOR_ATTACHMENT15: GLenum;
+ readonly COLOR_ATTACHMENT2: GLenum;
+ readonly COLOR_ATTACHMENT3: GLenum;
+ readonly COLOR_ATTACHMENT4: GLenum;
+ readonly COLOR_ATTACHMENT5: GLenum;
+ readonly COLOR_ATTACHMENT6: GLenum;
+ readonly COLOR_ATTACHMENT7: GLenum;
+ readonly COLOR_ATTACHMENT8: GLenum;
+ readonly COLOR_ATTACHMENT9: GLenum;
+ readonly COMPARE_REF_TO_TEXTURE: GLenum;
+ readonly CONDITION_SATISFIED: GLenum;
+ readonly COPY_READ_BUFFER: GLenum;
+ readonly COPY_READ_BUFFER_BINDING: GLenum;
+ readonly COPY_WRITE_BUFFER: GLenum;
+ readonly COPY_WRITE_BUFFER_BINDING: GLenum;
+ readonly CURRENT_QUERY: GLenum;
+ readonly DEPTH: GLenum;
+ readonly DEPTH24_STENCIL8: GLenum;
+ readonly DEPTH32F_STENCIL8: GLenum;
+ readonly DEPTH_COMPONENT24: GLenum;
+ readonly DEPTH_COMPONENT32F: GLenum;
+ readonly DRAW_BUFFER0: GLenum;
+ readonly DRAW_BUFFER1: GLenum;
+ readonly DRAW_BUFFER10: GLenum;
+ readonly DRAW_BUFFER11: GLenum;
+ readonly DRAW_BUFFER12: GLenum;
+ readonly DRAW_BUFFER13: GLenum;
+ readonly DRAW_BUFFER14: GLenum;
+ readonly DRAW_BUFFER15: GLenum;
+ readonly DRAW_BUFFER2: GLenum;
+ readonly DRAW_BUFFER3: GLenum;
+ readonly DRAW_BUFFER4: GLenum;
+ readonly DRAW_BUFFER5: GLenum;
+ readonly DRAW_BUFFER6: GLenum;
+ readonly DRAW_BUFFER7: GLenum;
+ readonly DRAW_BUFFER8: GLenum;
+ readonly DRAW_BUFFER9: GLenum;
+ readonly DRAW_FRAMEBUFFER: GLenum;
+ readonly DRAW_FRAMEBUFFER_BINDING: GLenum;
+ readonly DYNAMIC_COPY: GLenum;
+ readonly DYNAMIC_READ: GLenum;
+ readonly FLOAT_32_UNSIGNED_INT_24_8_REV: GLenum;
+ readonly FLOAT_MAT2x3: GLenum;
+ readonly FLOAT_MAT2x4: GLenum;
+ readonly FLOAT_MAT3x2: GLenum;
+ readonly FLOAT_MAT3x4: GLenum;
+ readonly FLOAT_MAT4x2: GLenum;
+ readonly FLOAT_MAT4x3: GLenum;
+ readonly FRAGMENT_SHADER_DERIVATIVE_HINT: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_RED_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: GLenum;
+ readonly FRAMEBUFFER_DEFAULT: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: GLenum;
+ readonly HALF_FLOAT: GLenum;
+ readonly INTERLEAVED_ATTRIBS: GLenum;
+ readonly INT_2_10_10_10_REV: GLenum;
+ readonly INT_SAMPLER_2D: GLenum;
+ readonly INT_SAMPLER_2D_ARRAY: GLenum;
+ readonly INT_SAMPLER_3D: GLenum;
+ readonly INT_SAMPLER_CUBE: GLenum;
+ readonly INVALID_INDEX: GLenum;
+ readonly MAX: GLenum;
+ readonly MAX_3D_TEXTURE_SIZE: GLenum;
+ readonly MAX_ARRAY_TEXTURE_LAYERS: GLenum;
+ readonly MAX_CLIENT_WAIT_TIMEOUT_WEBGL: GLenum;
+ readonly MAX_COLOR_ATTACHMENTS: GLenum;
+ readonly MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: GLenum;
+ readonly MAX_COMBINED_UNIFORM_BLOCKS: GLenum;
+ readonly MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: GLenum;
+ readonly MAX_DRAW_BUFFERS: GLenum;
+ readonly MAX_ELEMENTS_INDICES: GLenum;
+ readonly MAX_ELEMENTS_VERTICES: GLenum;
+ readonly MAX_ELEMENT_INDEX: GLenum;
+ readonly MAX_FRAGMENT_INPUT_COMPONENTS: GLenum;
+ readonly MAX_FRAGMENT_UNIFORM_BLOCKS: GLenum;
+ readonly MAX_FRAGMENT_UNIFORM_COMPONENTS: GLenum;
+ readonly MAX_PROGRAM_TEXEL_OFFSET: GLenum;
+ readonly MAX_SAMPLES: GLenum;
+ readonly MAX_SERVER_WAIT_TIMEOUT: GLenum;
+ readonly MAX_TEXTURE_LOD_BIAS: GLenum;
+ readonly MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: GLenum;
+ readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: GLenum;
+ readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: GLenum;
+ readonly MAX_UNIFORM_BLOCK_SIZE: GLenum;
+ readonly MAX_UNIFORM_BUFFER_BINDINGS: GLenum;
+ readonly MAX_VARYING_COMPONENTS: GLenum;
+ readonly MAX_VERTEX_OUTPUT_COMPONENTS: GLenum;
+ readonly MAX_VERTEX_UNIFORM_BLOCKS: GLenum;
+ readonly MAX_VERTEX_UNIFORM_COMPONENTS: GLenum;
+ readonly MIN: GLenum;
+ readonly MIN_PROGRAM_TEXEL_OFFSET: GLenum;
+ readonly OBJECT_TYPE: GLenum;
+ readonly PACK_ROW_LENGTH: GLenum;
+ readonly PACK_SKIP_PIXELS: GLenum;
+ readonly PACK_SKIP_ROWS: GLenum;
+ readonly PIXEL_PACK_BUFFER: GLenum;
+ readonly PIXEL_PACK_BUFFER_BINDING: GLenum;
+ readonly PIXEL_UNPACK_BUFFER: GLenum;
+ readonly PIXEL_UNPACK_BUFFER_BINDING: GLenum;
+ readonly QUERY_RESULT: GLenum;
+ readonly QUERY_RESULT_AVAILABLE: GLenum;
+ readonly R11F_G11F_B10F: GLenum;
+ readonly R16F: GLenum;
+ readonly R16I: GLenum;
+ readonly R16UI: GLenum;
+ readonly R32F: GLenum;
+ readonly R32I: GLenum;
+ readonly R32UI: GLenum;
+ readonly R8: GLenum;
+ readonly R8I: GLenum;
+ readonly R8UI: GLenum;
+ readonly R8_SNORM: GLenum;
+ readonly RASTERIZER_DISCARD: GLenum;
+ readonly READ_BUFFER: GLenum;
+ readonly READ_FRAMEBUFFER: GLenum;
+ readonly READ_FRAMEBUFFER_BINDING: GLenum;
+ readonly RED: GLenum;
+ readonly RED_INTEGER: GLenum;
+ readonly RENDERBUFFER_SAMPLES: GLenum;
+ readonly RG: GLenum;
+ readonly RG16F: GLenum;
+ readonly RG16I: GLenum;
+ readonly RG16UI: GLenum;
+ readonly RG32F: GLenum;
+ readonly RG32I: GLenum;
+ readonly RG32UI: GLenum;
+ readonly RG8: GLenum;
+ readonly RG8I: GLenum;
+ readonly RG8UI: GLenum;
+ readonly RG8_SNORM: GLenum;
+ readonly RGB10_A2: GLenum;
+ readonly RGB10_A2UI: GLenum;
+ readonly RGB16F: GLenum;
+ readonly RGB16I: GLenum;
+ readonly RGB16UI: GLenum;
+ readonly RGB32F: GLenum;
+ readonly RGB32I: GLenum;
+ readonly RGB32UI: GLenum;
+ readonly RGB8: GLenum;
+ readonly RGB8I: GLenum;
+ readonly RGB8UI: GLenum;
+ readonly RGB8_SNORM: GLenum;
+ readonly RGB9_E5: GLenum;
+ readonly RGBA16F: GLenum;
+ readonly RGBA16I: GLenum;
+ readonly RGBA16UI: GLenum;
+ readonly RGBA32F: GLenum;
+ readonly RGBA32I: GLenum;
+ readonly RGBA32UI: GLenum;
+ readonly RGBA8: GLenum;
+ readonly RGBA8I: GLenum;
+ readonly RGBA8UI: GLenum;
+ readonly RGBA8_SNORM: GLenum;
+ readonly RGBA_INTEGER: GLenum;
+ readonly RGB_INTEGER: GLenum;
+ readonly RG_INTEGER: GLenum;
+ readonly SAMPLER_2D_ARRAY: GLenum;
+ readonly SAMPLER_2D_ARRAY_SHADOW: GLenum;
+ readonly SAMPLER_2D_SHADOW: GLenum;
+ readonly SAMPLER_3D: GLenum;
+ readonly SAMPLER_BINDING: GLenum;
+ readonly SAMPLER_CUBE_SHADOW: GLenum;
+ readonly SEPARATE_ATTRIBS: GLenum;
+ readonly SIGNALED: GLenum;
+ readonly SIGNED_NORMALIZED: GLenum;
+ readonly SRGB: GLenum;
+ readonly SRGB8: GLenum;
+ readonly SRGB8_ALPHA8: GLenum;
+ readonly STATIC_COPY: GLenum;
+ readonly STATIC_READ: GLenum;
+ readonly STENCIL: GLenum;
+ readonly STREAM_COPY: GLenum;
+ readonly STREAM_READ: GLenum;
+ readonly SYNC_CONDITION: GLenum;
+ readonly SYNC_FENCE: GLenum;
+ readonly SYNC_FLAGS: GLenum;
+ readonly SYNC_FLUSH_COMMANDS_BIT: GLenum;
+ readonly SYNC_GPU_COMMANDS_COMPLETE: GLenum;
+ readonly SYNC_STATUS: GLenum;
+ readonly TEXTURE_2D_ARRAY: GLenum;
+ readonly TEXTURE_3D: GLenum;
+ readonly TEXTURE_BASE_LEVEL: GLenum;
+ readonly TEXTURE_BINDING_2D_ARRAY: GLenum;
+ readonly TEXTURE_BINDING_3D: GLenum;
+ readonly TEXTURE_COMPARE_FUNC: GLenum;
+ readonly TEXTURE_COMPARE_MODE: GLenum;
+ readonly TEXTURE_IMMUTABLE_FORMAT: GLenum;
+ readonly TEXTURE_IMMUTABLE_LEVELS: GLenum;
+ readonly TEXTURE_MAX_LEVEL: GLenum;
+ readonly TEXTURE_MAX_LOD: GLenum;
+ readonly TEXTURE_MIN_LOD: GLenum;
+ readonly TEXTURE_WRAP_R: GLenum;
+ readonly TIMEOUT_EXPIRED: GLenum;
+ readonly TIMEOUT_IGNORED: GLint64;
+ readonly TRANSFORM_FEEDBACK: GLenum;
+ readonly TRANSFORM_FEEDBACK_ACTIVE: GLenum;
+ readonly TRANSFORM_FEEDBACK_BINDING: GLenum;
+ readonly TRANSFORM_FEEDBACK_BUFFER: GLenum;
+ readonly TRANSFORM_FEEDBACK_BUFFER_BINDING: GLenum;
+ readonly TRANSFORM_FEEDBACK_BUFFER_MODE: GLenum;
+ readonly TRANSFORM_FEEDBACK_BUFFER_SIZE: GLenum;
+ readonly TRANSFORM_FEEDBACK_BUFFER_START: GLenum;
+ readonly TRANSFORM_FEEDBACK_PAUSED: GLenum;
+ readonly TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: GLenum;
+ readonly TRANSFORM_FEEDBACK_VARYINGS: GLenum;
+ readonly UNIFORM_ARRAY_STRIDE: GLenum;
+ readonly UNIFORM_BLOCK_ACTIVE_UNIFORMS: GLenum;
+ readonly UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: GLenum;
+ readonly UNIFORM_BLOCK_BINDING: GLenum;
+ readonly UNIFORM_BLOCK_DATA_SIZE: GLenum;
+ readonly UNIFORM_BLOCK_INDEX: GLenum;
+ readonly UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: GLenum;
+ readonly UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: GLenum;
+ readonly UNIFORM_BUFFER: GLenum;
+ readonly UNIFORM_BUFFER_BINDING: GLenum;
+ readonly UNIFORM_BUFFER_OFFSET_ALIGNMENT: GLenum;
+ readonly UNIFORM_BUFFER_SIZE: GLenum;
+ readonly UNIFORM_BUFFER_START: GLenum;
+ readonly UNIFORM_IS_ROW_MAJOR: GLenum;
+ readonly UNIFORM_MATRIX_STRIDE: GLenum;
+ readonly UNIFORM_OFFSET: GLenum;
+ readonly UNIFORM_SIZE: GLenum;
+ readonly UNIFORM_TYPE: GLenum;
+ readonly UNPACK_IMAGE_HEIGHT: GLenum;
+ readonly UNPACK_ROW_LENGTH: GLenum;
+ readonly UNPACK_SKIP_IMAGES: GLenum;
+ readonly UNPACK_SKIP_PIXELS: GLenum;
+ readonly UNPACK_SKIP_ROWS: GLenum;
+ readonly UNSIGNALED: GLenum;
+ readonly UNSIGNED_INT_10F_11F_11F_REV: GLenum;
+ readonly UNSIGNED_INT_24_8: GLenum;
+ readonly UNSIGNED_INT_2_10_10_10_REV: GLenum;
+ readonly UNSIGNED_INT_5_9_9_9_REV: GLenum;
+ readonly UNSIGNED_INT_SAMPLER_2D: GLenum;
+ readonly UNSIGNED_INT_SAMPLER_2D_ARRAY: GLenum;
+ readonly UNSIGNED_INT_SAMPLER_3D: GLenum;
+ readonly UNSIGNED_INT_SAMPLER_CUBE: GLenum;
+ readonly UNSIGNED_INT_VEC2: GLenum;
+ readonly UNSIGNED_INT_VEC3: GLenum;
+ readonly UNSIGNED_INT_VEC4: GLenum;
+ readonly UNSIGNED_NORMALIZED: GLenum;
+ readonly VERTEX_ARRAY_BINDING: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_DIVISOR: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_INTEGER: GLenum;
+ readonly WAIT_FAILED: GLenum;
+};
+
+interface WebGL2RenderingContextBase {
+ beginQuery(target: GLenum, query: WebGLQuery): void;
+ beginTransformFeedback(primitiveMode: GLenum): void;
+ bindBufferBase(target: GLenum, index: GLuint, buffer: WebGLBuffer | null): void;
+ bindBufferRange(target: GLenum, index: GLuint, buffer: WebGLBuffer | null, offset: GLintptr, size: GLsizeiptr): void;
+ bindSampler(unit: GLuint, sampler: WebGLSampler | null): void;
+ bindTransformFeedback(target: GLenum, tf: WebGLTransformFeedback | null): void;
+ bindVertexArray(array: WebGLVertexArrayObject | null): void;
+ blitFramebuffer(srcX0: GLint, srcY0: GLint, srcX1: GLint, srcY1: GLint, dstX0: GLint, dstY0: GLint, dstX1: GLint, dstY1: GLint, mask: GLbitfield, filter: GLenum): void;
+ clearBufferfi(buffer: GLenum, drawbuffer: GLint, depth: GLfloat, stencil: GLint): void;
+ clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Float32List, srcOffset?: GLuint): void;
+ clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Int32List, srcOffset?: GLuint): void;
+ clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Uint32List, srcOffset?: GLuint): void;
+ clientWaitSync(sync: WebGLSync, flags: GLbitfield, timeout: GLuint64): GLenum;
+ compressedTexImage3D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, imageSize: GLsizei, offset: GLintptr): void;
+ compressedTexImage3D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint): void;
+ compressedTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, imageSize: GLsizei, offset: GLintptr): void;
+ compressedTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint): void;
+ copyBufferSubData(readTarget: GLenum, writeTarget: GLenum, readOffset: GLintptr, writeOffset: GLintptr, size: GLsizeiptr): void;
+ copyTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
+ createQuery(): WebGLQuery | null;
+ createSampler(): WebGLSampler | null;
+ createTransformFeedback(): WebGLTransformFeedback | null;
+ createVertexArray(): WebGLVertexArrayObject | null;
+ deleteQuery(query: WebGLQuery | null): void;
+ deleteSampler(sampler: WebGLSampler | null): void;
+ deleteSync(sync: WebGLSync | null): void;
+ deleteTransformFeedback(tf: WebGLTransformFeedback | null): void;
+ deleteVertexArray(vertexArray: WebGLVertexArrayObject | null): void;
+ drawArraysInstanced(mode: GLenum, first: GLint, count: GLsizei, instanceCount: GLsizei): void;
+ drawBuffers(buffers: GLenum[]): void;
+ drawElementsInstanced(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr, instanceCount: GLsizei): void;
+ drawRangeElements(mode: GLenum, start: GLuint, end: GLuint, count: GLsizei, type: GLenum, offset: GLintptr): void;
+ endQuery(target: GLenum): void;
+ endTransformFeedback(): void;
+ fenceSync(condition: GLenum, flags: GLbitfield): WebGLSync | null;
+ framebufferTextureLayer(target: GLenum, attachment: GLenum, texture: WebGLTexture | null, level: GLint, layer: GLint): void;
+ getActiveUniformBlockName(program: WebGLProgram, uniformBlockIndex: GLuint): string | null;
+ getActiveUniformBlockParameter(program: WebGLProgram, uniformBlockIndex: GLuint, pname: GLenum): any;
+ getActiveUniforms(program: WebGLProgram, uniformIndices: GLuint[], pname: GLenum): any;
+ getBufferSubData(target: GLenum, srcByteOffset: GLintptr, dstBuffer: ArrayBufferView, dstOffset?: GLuint, length?: GLuint): void;
+ getFragDataLocation(program: WebGLProgram, name: string): GLint;
+ getIndexedParameter(target: GLenum, index: GLuint): any;
+ getInternalformatParameter(target: GLenum, internalformat: GLenum, pname: GLenum): any;
+ getQuery(target: GLenum, pname: GLenum): WebGLQuery | null;
+ getQueryParameter(query: WebGLQuery, pname: GLenum): any;
+ getSamplerParameter(sampler: WebGLSampler, pname: GLenum): any;
+ getSyncParameter(sync: WebGLSync, pname: GLenum): any;
+ getTransformFeedbackVarying(program: WebGLProgram, index: GLuint): WebGLActiveInfo | null;
+ getUniformBlockIndex(program: WebGLProgram, uniformBlockName: string): GLuint;
+ getUniformIndices(program: WebGLProgram, uniformNames: string[]): GLuint[] | null;
+ invalidateFramebuffer(target: GLenum, attachments: GLenum[]): void;
+ invalidateSubFramebuffer(target: GLenum, attachments: GLenum[], x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
+ isQuery(query: WebGLQuery | null): GLboolean;
+ isSampler(sampler: WebGLSampler | null): GLboolean;
+ isSync(sync: WebGLSync | null): GLboolean;
+ isTransformFeedback(tf: WebGLTransformFeedback | null): GLboolean;
+ isVertexArray(vertexArray: WebGLVertexArrayObject | null): GLboolean;
+ pauseTransformFeedback(): void;
+ readBuffer(src: GLenum): void;
+ renderbufferStorageMultisample(target: GLenum, samples: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei): void;
+ resumeTransformFeedback(): void;
+ samplerParameterf(sampler: WebGLSampler, pname: GLenum, param: GLfloat): void;
+ samplerParameteri(sampler: WebGLSampler, pname: GLenum, param: GLint): void;
+ texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, pboOffset: GLintptr): void;
+ texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
+ texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView | null): void;
+ texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint): void;
+ texStorage2D(target: GLenum, levels: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei): void;
+ texStorage3D(target: GLenum, levels: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei): void;
+ texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, pboOffset: GLintptr): void;
+ texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, source: TexImageSource): void;
+ texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView | null, srcOffset?: GLuint): void;
+ transformFeedbackVaryings(program: WebGLProgram, varyings: string[], bufferMode: GLenum): void;
+ uniform1ui(location: WebGLUniformLocation | null, v0: GLuint): void;
+ uniform1uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform2ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint): void;
+ uniform2uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform3ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint, v2: GLuint): void;
+ uniform3uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform4ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint, v2: GLuint, v3: GLuint): void;
+ uniform4uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformBlockBinding(program: WebGLProgram, uniformBlockIndex: GLuint, uniformBlockBinding: GLuint): void;
+ uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix3x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ vertexAttribDivisor(index: GLuint, divisor: GLuint): void;
+ vertexAttribI4i(index: GLuint, x: GLint, y: GLint, z: GLint, w: GLint): void;
+ vertexAttribI4iv(index: GLuint, values: Int32List): void;
+ vertexAttribI4ui(index: GLuint, x: GLuint, y: GLuint, z: GLuint, w: GLuint): void;
+ vertexAttribI4uiv(index: GLuint, values: Uint32List): void;
+ vertexAttribIPointer(index: GLuint, size: GLint, type: GLenum, stride: GLsizei, offset: GLintptr): void;
+ waitSync(sync: WebGLSync, flags: GLbitfield, timeout: GLint64): void;
+ readonly ACTIVE_UNIFORM_BLOCKS: GLenum;
+ readonly ALREADY_SIGNALED: GLenum;
+ readonly ANY_SAMPLES_PASSED: GLenum;
+ readonly ANY_SAMPLES_PASSED_CONSERVATIVE: GLenum;
+ readonly COLOR: GLenum;
+ readonly COLOR_ATTACHMENT1: GLenum;
+ readonly COLOR_ATTACHMENT10: GLenum;
+ readonly COLOR_ATTACHMENT11: GLenum;
+ readonly COLOR_ATTACHMENT12: GLenum;
+ readonly COLOR_ATTACHMENT13: GLenum;
+ readonly COLOR_ATTACHMENT14: GLenum;
+ readonly COLOR_ATTACHMENT15: GLenum;
+ readonly COLOR_ATTACHMENT2: GLenum;
+ readonly COLOR_ATTACHMENT3: GLenum;
+ readonly COLOR_ATTACHMENT4: GLenum;
+ readonly COLOR_ATTACHMENT5: GLenum;
+ readonly COLOR_ATTACHMENT6: GLenum;
+ readonly COLOR_ATTACHMENT7: GLenum;
+ readonly COLOR_ATTACHMENT8: GLenum;
+ readonly COLOR_ATTACHMENT9: GLenum;
+ readonly COMPARE_REF_TO_TEXTURE: GLenum;
+ readonly CONDITION_SATISFIED: GLenum;
+ readonly COPY_READ_BUFFER: GLenum;
+ readonly COPY_READ_BUFFER_BINDING: GLenum;
+ readonly COPY_WRITE_BUFFER: GLenum;
+ readonly COPY_WRITE_BUFFER_BINDING: GLenum;
+ readonly CURRENT_QUERY: GLenum;
+ readonly DEPTH: GLenum;
+ readonly DEPTH24_STENCIL8: GLenum;
+ readonly DEPTH32F_STENCIL8: GLenum;
+ readonly DEPTH_COMPONENT24: GLenum;
+ readonly DEPTH_COMPONENT32F: GLenum;
+ readonly DRAW_BUFFER0: GLenum;
+ readonly DRAW_BUFFER1: GLenum;
+ readonly DRAW_BUFFER10: GLenum;
+ readonly DRAW_BUFFER11: GLenum;
+ readonly DRAW_BUFFER12: GLenum;
+ readonly DRAW_BUFFER13: GLenum;
+ readonly DRAW_BUFFER14: GLenum;
+ readonly DRAW_BUFFER15: GLenum;
+ readonly DRAW_BUFFER2: GLenum;
+ readonly DRAW_BUFFER3: GLenum;
+ readonly DRAW_BUFFER4: GLenum;
+ readonly DRAW_BUFFER5: GLenum;
+ readonly DRAW_BUFFER6: GLenum;
+ readonly DRAW_BUFFER7: GLenum;
+ readonly DRAW_BUFFER8: GLenum;
+ readonly DRAW_BUFFER9: GLenum;
+ readonly DRAW_FRAMEBUFFER: GLenum;
+ readonly DRAW_FRAMEBUFFER_BINDING: GLenum;
+ readonly DYNAMIC_COPY: GLenum;
+ readonly DYNAMIC_READ: GLenum;
+ readonly FLOAT_32_UNSIGNED_INT_24_8_REV: GLenum;
+ readonly FLOAT_MAT2x3: GLenum;
+ readonly FLOAT_MAT2x4: GLenum;
+ readonly FLOAT_MAT3x2: GLenum;
+ readonly FLOAT_MAT3x4: GLenum;
+ readonly FLOAT_MAT4x2: GLenum;
+ readonly FLOAT_MAT4x3: GLenum;
+ readonly FRAGMENT_SHADER_DERIVATIVE_HINT: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_RED_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: GLenum;
+ readonly FRAMEBUFFER_DEFAULT: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: GLenum;
+ readonly HALF_FLOAT: GLenum;
+ readonly INTERLEAVED_ATTRIBS: GLenum;
+ readonly INT_2_10_10_10_REV: GLenum;
+ readonly INT_SAMPLER_2D: GLenum;
+ readonly INT_SAMPLER_2D_ARRAY: GLenum;
+ readonly INT_SAMPLER_3D: GLenum;
+ readonly INT_SAMPLER_CUBE: GLenum;
+ readonly INVALID_INDEX: GLenum;
+ readonly MAX: GLenum;
+ readonly MAX_3D_TEXTURE_SIZE: GLenum;
+ readonly MAX_ARRAY_TEXTURE_LAYERS: GLenum;
+ readonly MAX_CLIENT_WAIT_TIMEOUT_WEBGL: GLenum;
+ readonly MAX_COLOR_ATTACHMENTS: GLenum;
+ readonly MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: GLenum;
+ readonly MAX_COMBINED_UNIFORM_BLOCKS: GLenum;
+ readonly MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: GLenum;
+ readonly MAX_DRAW_BUFFERS: GLenum;
+ readonly MAX_ELEMENTS_INDICES: GLenum;
+ readonly MAX_ELEMENTS_VERTICES: GLenum;
+ readonly MAX_ELEMENT_INDEX: GLenum;
+ readonly MAX_FRAGMENT_INPUT_COMPONENTS: GLenum;
+ readonly MAX_FRAGMENT_UNIFORM_BLOCKS: GLenum;
+ readonly MAX_FRAGMENT_UNIFORM_COMPONENTS: GLenum;
+ readonly MAX_PROGRAM_TEXEL_OFFSET: GLenum;
+ readonly MAX_SAMPLES: GLenum;
+ readonly MAX_SERVER_WAIT_TIMEOUT: GLenum;
+ readonly MAX_TEXTURE_LOD_BIAS: GLenum;
+ readonly MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: GLenum;
+ readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: GLenum;
+ readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: GLenum;
+ readonly MAX_UNIFORM_BLOCK_SIZE: GLenum;
+ readonly MAX_UNIFORM_BUFFER_BINDINGS: GLenum;
+ readonly MAX_VARYING_COMPONENTS: GLenum;
+ readonly MAX_VERTEX_OUTPUT_COMPONENTS: GLenum;
+ readonly MAX_VERTEX_UNIFORM_BLOCKS: GLenum;
+ readonly MAX_VERTEX_UNIFORM_COMPONENTS: GLenum;
+ readonly MIN: GLenum;
+ readonly MIN_PROGRAM_TEXEL_OFFSET: GLenum;
+ readonly OBJECT_TYPE: GLenum;
+ readonly PACK_ROW_LENGTH: GLenum;
+ readonly PACK_SKIP_PIXELS: GLenum;
+ readonly PACK_SKIP_ROWS: GLenum;
+ readonly PIXEL_PACK_BUFFER: GLenum;
+ readonly PIXEL_PACK_BUFFER_BINDING: GLenum;
+ readonly PIXEL_UNPACK_BUFFER: GLenum;
+ readonly PIXEL_UNPACK_BUFFER_BINDING: GLenum;
+ readonly QUERY_RESULT: GLenum;
+ readonly QUERY_RESULT_AVAILABLE: GLenum;
+ readonly R11F_G11F_B10F: GLenum;
+ readonly R16F: GLenum;
+ readonly R16I: GLenum;
+ readonly R16UI: GLenum;
+ readonly R32F: GLenum;
+ readonly R32I: GLenum;
+ readonly R32UI: GLenum;
+ readonly R8: GLenum;
+ readonly R8I: GLenum;
+ readonly R8UI: GLenum;
+ readonly R8_SNORM: GLenum;
+ readonly RASTERIZER_DISCARD: GLenum;
+ readonly READ_BUFFER: GLenum;
+ readonly READ_FRAMEBUFFER: GLenum;
+ readonly READ_FRAMEBUFFER_BINDING: GLenum;
+ readonly RED: GLenum;
+ readonly RED_INTEGER: GLenum;
+ readonly RENDERBUFFER_SAMPLES: GLenum;
+ readonly RG: GLenum;
+ readonly RG16F: GLenum;
+ readonly RG16I: GLenum;
+ readonly RG16UI: GLenum;
+ readonly RG32F: GLenum;
+ readonly RG32I: GLenum;
+ readonly RG32UI: GLenum;
+ readonly RG8: GLenum;
+ readonly RG8I: GLenum;
+ readonly RG8UI: GLenum;
+ readonly RG8_SNORM: GLenum;
+ readonly RGB10_A2: GLenum;
+ readonly RGB10_A2UI: GLenum;
+ readonly RGB16F: GLenum;
+ readonly RGB16I: GLenum;
+ readonly RGB16UI: GLenum;
+ readonly RGB32F: GLenum;
+ readonly RGB32I: GLenum;
+ readonly RGB32UI: GLenum;
+ readonly RGB8: GLenum;
+ readonly RGB8I: GLenum;
+ readonly RGB8UI: GLenum;
+ readonly RGB8_SNORM: GLenum;
+ readonly RGB9_E5: GLenum;
+ readonly RGBA16F: GLenum;
+ readonly RGBA16I: GLenum;
+ readonly RGBA16UI: GLenum;
+ readonly RGBA32F: GLenum;
+ readonly RGBA32I: GLenum;
+ readonly RGBA32UI: GLenum;
+ readonly RGBA8: GLenum;
+ readonly RGBA8I: GLenum;
+ readonly RGBA8UI: GLenum;
+ readonly RGBA8_SNORM: GLenum;
+ readonly RGBA_INTEGER: GLenum;
+ readonly RGB_INTEGER: GLenum;
+ readonly RG_INTEGER: GLenum;
+ readonly SAMPLER_2D_ARRAY: GLenum;
+ readonly SAMPLER_2D_ARRAY_SHADOW: GLenum;
+ readonly SAMPLER_2D_SHADOW: GLenum;
+ readonly SAMPLER_3D: GLenum;
+ readonly SAMPLER_BINDING: GLenum;
+ readonly SAMPLER_CUBE_SHADOW: GLenum;
+ readonly SEPARATE_ATTRIBS: GLenum;
+ readonly SIGNALED: GLenum;
+ readonly SIGNED_NORMALIZED: GLenum;
+ readonly SRGB: GLenum;
+ readonly SRGB8: GLenum;
+ readonly SRGB8_ALPHA8: GLenum;
+ readonly STATIC_COPY: GLenum;
+ readonly STATIC_READ: GLenum;
+ readonly STENCIL: GLenum;
+ readonly STREAM_COPY: GLenum;
+ readonly STREAM_READ: GLenum;
+ readonly SYNC_CONDITION: GLenum;
+ readonly SYNC_FENCE: GLenum;
+ readonly SYNC_FLAGS: GLenum;
+ readonly SYNC_FLUSH_COMMANDS_BIT: GLenum;
+ readonly SYNC_GPU_COMMANDS_COMPLETE: GLenum;
+ readonly SYNC_STATUS: GLenum;
+ readonly TEXTURE_2D_ARRAY: GLenum;
+ readonly TEXTURE_3D: GLenum;
+ readonly TEXTURE_BASE_LEVEL: GLenum;
+ readonly TEXTURE_BINDING_2D_ARRAY: GLenum;
+ readonly TEXTURE_BINDING_3D: GLenum;
+ readonly TEXTURE_COMPARE_FUNC: GLenum;
+ readonly TEXTURE_COMPARE_MODE: GLenum;
+ readonly TEXTURE_IMMUTABLE_FORMAT: GLenum;
+ readonly TEXTURE_IMMUTABLE_LEVELS: GLenum;
+ readonly TEXTURE_MAX_LEVEL: GLenum;
+ readonly TEXTURE_MAX_LOD: GLenum;
+ readonly TEXTURE_MIN_LOD: GLenum;
+ readonly TEXTURE_WRAP_R: GLenum;
+ readonly TIMEOUT_EXPIRED: GLenum;
+ readonly TIMEOUT_IGNORED: GLint64;
+ readonly TRANSFORM_FEEDBACK: GLenum;
+ readonly TRANSFORM_FEEDBACK_ACTIVE: GLenum;
+ readonly TRANSFORM_FEEDBACK_BINDING: GLenum;
+ readonly TRANSFORM_FEEDBACK_BUFFER: GLenum;
+ readonly TRANSFORM_FEEDBACK_BUFFER_BINDING: GLenum;
+ readonly TRANSFORM_FEEDBACK_BUFFER_MODE: GLenum;
+ readonly TRANSFORM_FEEDBACK_BUFFER_SIZE: GLenum;
+ readonly TRANSFORM_FEEDBACK_BUFFER_START: GLenum;
+ readonly TRANSFORM_FEEDBACK_PAUSED: GLenum;
+ readonly TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: GLenum;
+ readonly TRANSFORM_FEEDBACK_VARYINGS: GLenum;
+ readonly UNIFORM_ARRAY_STRIDE: GLenum;
+ readonly UNIFORM_BLOCK_ACTIVE_UNIFORMS: GLenum;
+ readonly UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: GLenum;
+ readonly UNIFORM_BLOCK_BINDING: GLenum;
+ readonly UNIFORM_BLOCK_DATA_SIZE: GLenum;
+ readonly UNIFORM_BLOCK_INDEX: GLenum;
+ readonly UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: GLenum;
+ readonly UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: GLenum;
+ readonly UNIFORM_BUFFER: GLenum;
+ readonly UNIFORM_BUFFER_BINDING: GLenum;
+ readonly UNIFORM_BUFFER_OFFSET_ALIGNMENT: GLenum;
+ readonly UNIFORM_BUFFER_SIZE: GLenum;
+ readonly UNIFORM_BUFFER_START: GLenum;
+ readonly UNIFORM_IS_ROW_MAJOR: GLenum;
+ readonly UNIFORM_MATRIX_STRIDE: GLenum;
+ readonly UNIFORM_OFFSET: GLenum;
+ readonly UNIFORM_SIZE: GLenum;
+ readonly UNIFORM_TYPE: GLenum;
+ readonly UNPACK_IMAGE_HEIGHT: GLenum;
+ readonly UNPACK_ROW_LENGTH: GLenum;
+ readonly UNPACK_SKIP_IMAGES: GLenum;
+ readonly UNPACK_SKIP_PIXELS: GLenum;
+ readonly UNPACK_SKIP_ROWS: GLenum;
+ readonly UNSIGNALED: GLenum;
+ readonly UNSIGNED_INT_10F_11F_11F_REV: GLenum;
+ readonly UNSIGNED_INT_24_8: GLenum;
+ readonly UNSIGNED_INT_2_10_10_10_REV: GLenum;
+ readonly UNSIGNED_INT_5_9_9_9_REV: GLenum;
+ readonly UNSIGNED_INT_SAMPLER_2D: GLenum;
+ readonly UNSIGNED_INT_SAMPLER_2D_ARRAY: GLenum;
+ readonly UNSIGNED_INT_SAMPLER_3D: GLenum;
+ readonly UNSIGNED_INT_SAMPLER_CUBE: GLenum;
+ readonly UNSIGNED_INT_VEC2: GLenum;
+ readonly UNSIGNED_INT_VEC3: GLenum;
+ readonly UNSIGNED_INT_VEC4: GLenum;
+ readonly UNSIGNED_NORMALIZED: GLenum;
+ readonly VERTEX_ARRAY_BINDING: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_DIVISOR: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_INTEGER: GLenum;
+ readonly WAIT_FAILED: GLenum;
+}
+
+interface WebGL2RenderingContextOverloads {
+ bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum): void;
+ bufferData(target: GLenum, srcData: BufferSource | null, usage: GLenum): void;
+ bufferData(target: GLenum, srcData: ArrayBufferView, usage: GLenum, srcOffset: GLuint, length?: GLuint): void;
+ bufferSubData(target: GLenum, dstByteOffset: GLintptr, srcData: BufferSource): void;
+ bufferSubData(target: GLenum, dstByteOffset: GLintptr, srcData: ArrayBufferView, srcOffset: GLuint, length?: GLuint): void;
+ compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, imageSize: GLsizei, offset: GLintptr): void;
+ compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint): void;
+ compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, imageSize: GLsizei, offset: GLintptr): void;
+ compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint): void;
+ readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, dstData: ArrayBufferView | null): void;
+ readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, offset: GLintptr): void;
+ readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, dstData: ArrayBufferView, dstOffset: GLuint): void;
+ texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
+ texImage2D(target: GLenum, level: GLint, internalformat: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
+ texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pboOffset: GLintptr): void;
+ texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
+ texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint): void;
+ texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
+ texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
+ texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pboOffset: GLintptr): void;
+ texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, source: TexImageSource): void;
+ texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint): void;
+ uniform1fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform1iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform2fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform2iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform3fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform3iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform4fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniform4iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+ uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
+}
+
+/** Part of the WebGL API and represents the information returned by calling the WebGLRenderingContext.getActiveAttrib() and WebGLRenderingContext.getActiveUniform() methods. */
+interface WebGLActiveInfo {
+ readonly name: string;
+ readonly size: GLint;
+ readonly type: GLenum;
+}
+
+declare var WebGLActiveInfo: {
+ prototype: WebGLActiveInfo;
+ new(): WebGLActiveInfo;
+};
+
+/** Part of the WebGL API and represents an opaque buffer object storing data such as vertices or colors. */
+interface WebGLBuffer extends WebGLObject {
+}
+
+declare var WebGLBuffer: {
+ prototype: WebGLBuffer;
+ new(): WebGLBuffer;
+};
+
+/** The WebContextEvent interface is part of the WebGL API and is an interface for an event that is generated in response to a status change to the WebGL rendering context. */
+interface WebGLContextEvent extends Event {
+ readonly statusMessage: string;
+}
+
+declare var WebGLContextEvent: {
+ prototype: WebGLContextEvent;
+ new(type: string, eventInit?: WebGLContextEventInit): WebGLContextEvent;
+};
+
+/** Part of the WebGL API and represents a collection of buffers that serve as a rendering destination. */
+interface WebGLFramebuffer extends WebGLObject {
+}
+
+declare var WebGLFramebuffer: {
+ prototype: WebGLFramebuffer;
+ new(): WebGLFramebuffer;
+};
+
+interface WebGLObject {
+}
+
+declare var WebGLObject: {
+ prototype: WebGLObject;
+ new(): WebGLObject;
+};
+
+/** The WebGLProgram is part of the WebGL API and is a combination of two compiled WebGLShaders consisting of a vertex shader and a fragment shader (both written in GLSL). */
+interface WebGLProgram extends WebGLObject {
+}
+
+declare var WebGLProgram: {
+ prototype: WebGLProgram;
+ new(): WebGLProgram;
+};
+
+interface WebGLQuery extends WebGLObject {
+}
+
+declare var WebGLQuery: {
+ prototype: WebGLQuery;
+ new(): WebGLQuery;
+};
+
+/** Part of the WebGL API and represents a buffer that can contain an image, or can be source or target of an rendering operation. */
+interface WebGLRenderbuffer extends WebGLObject {
+}
+
+declare var WebGLRenderbuffer: {
+ prototype: WebGLRenderbuffer;
+ new(): WebGLRenderbuffer;
+};
+
+/** Provides an interface to the OpenGL ES 2.0 graphics rendering context for the drawing surface of an HTML <canvas> element. */
+interface WebGLRenderingContext extends WebGLRenderingContextBase, WebGLRenderingContextOverloads {
+}
+
+declare var WebGLRenderingContext: {
+ prototype: WebGLRenderingContext;
+ new(): WebGLRenderingContext;
+ readonly ACTIVE_ATTRIBUTES: GLenum;
+ readonly ACTIVE_TEXTURE: GLenum;
+ readonly ACTIVE_UNIFORMS: GLenum;
+ readonly ALIASED_LINE_WIDTH_RANGE: GLenum;
+ readonly ALIASED_POINT_SIZE_RANGE: GLenum;
+ readonly ALPHA: GLenum;
+ readonly ALPHA_BITS: GLenum;
+ readonly ALWAYS: GLenum;
+ readonly ARRAY_BUFFER: GLenum;
+ readonly ARRAY_BUFFER_BINDING: GLenum;
+ readonly ATTACHED_SHADERS: GLenum;
+ readonly BACK: GLenum;
+ readonly BLEND: GLenum;
+ readonly BLEND_COLOR: GLenum;
+ readonly BLEND_DST_ALPHA: GLenum;
+ readonly BLEND_DST_RGB: GLenum;
+ readonly BLEND_EQUATION: GLenum;
+ readonly BLEND_EQUATION_ALPHA: GLenum;
+ readonly BLEND_EQUATION_RGB: GLenum;
+ readonly BLEND_SRC_ALPHA: GLenum;
+ readonly BLEND_SRC_RGB: GLenum;
+ readonly BLUE_BITS: GLenum;
+ readonly BOOL: GLenum;
+ readonly BOOL_VEC2: GLenum;
+ readonly BOOL_VEC3: GLenum;
+ readonly BOOL_VEC4: GLenum;
+ readonly BROWSER_DEFAULT_WEBGL: GLenum;
+ readonly BUFFER_SIZE: GLenum;
+ readonly BUFFER_USAGE: GLenum;
+ readonly BYTE: GLenum;
+ readonly CCW: GLenum;
+ readonly CLAMP_TO_EDGE: GLenum;
+ readonly COLOR_ATTACHMENT0: GLenum;
+ readonly COLOR_BUFFER_BIT: GLenum;
+ readonly COLOR_CLEAR_VALUE: GLenum;
+ readonly COLOR_WRITEMASK: GLenum;
+ readonly COMPILE_STATUS: GLenum;
+ readonly COMPRESSED_TEXTURE_FORMATS: GLenum;
+ readonly CONSTANT_ALPHA: GLenum;
+ readonly CONSTANT_COLOR: GLenum;
+ readonly CONTEXT_LOST_WEBGL: GLenum;
+ readonly CULL_FACE: GLenum;
+ readonly CULL_FACE_MODE: GLenum;
+ readonly CURRENT_PROGRAM: GLenum;
+ readonly CURRENT_VERTEX_ATTRIB: GLenum;
+ readonly CW: GLenum;
+ readonly DECR: GLenum;
+ readonly DECR_WRAP: GLenum;
+ readonly DELETE_STATUS: GLenum;
+ readonly DEPTH_ATTACHMENT: GLenum;
+ readonly DEPTH_BITS: GLenum;
+ readonly DEPTH_BUFFER_BIT: GLenum;
+ readonly DEPTH_CLEAR_VALUE: GLenum;
+ readonly DEPTH_COMPONENT: GLenum;
+ readonly DEPTH_COMPONENT16: GLenum;
+ readonly DEPTH_FUNC: GLenum;
+ readonly DEPTH_RANGE: GLenum;
+ readonly DEPTH_STENCIL: GLenum;
+ readonly DEPTH_STENCIL_ATTACHMENT: GLenum;
+ readonly DEPTH_TEST: GLenum;
+ readonly DEPTH_WRITEMASK: GLenum;
+ readonly DITHER: GLenum;
+ readonly DONT_CARE: GLenum;
+ readonly DST_ALPHA: GLenum;
+ readonly DST_COLOR: GLenum;
+ readonly DYNAMIC_DRAW: GLenum;
+ readonly ELEMENT_ARRAY_BUFFER: GLenum;
+ readonly ELEMENT_ARRAY_BUFFER_BINDING: GLenum;
+ readonly EQUAL: GLenum;
+ readonly FASTEST: GLenum;
+ readonly FLOAT: GLenum;
+ readonly FLOAT_MAT2: GLenum;
+ readonly FLOAT_MAT3: GLenum;
+ readonly FLOAT_MAT4: GLenum;
+ readonly FLOAT_VEC2: GLenum;
+ readonly FLOAT_VEC3: GLenum;
+ readonly FLOAT_VEC4: GLenum;
+ readonly FRAGMENT_SHADER: GLenum;
+ readonly FRAMEBUFFER: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: GLenum;
+ readonly FRAMEBUFFER_BINDING: GLenum;
+ readonly FRAMEBUFFER_COMPLETE: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: GLenum;
+ readonly FRAMEBUFFER_UNSUPPORTED: GLenum;
+ readonly FRONT: GLenum;
+ readonly FRONT_AND_BACK: GLenum;
+ readonly FRONT_FACE: GLenum;
+ readonly FUNC_ADD: GLenum;
+ readonly FUNC_REVERSE_SUBTRACT: GLenum;
+ readonly FUNC_SUBTRACT: GLenum;
+ readonly GENERATE_MIPMAP_HINT: GLenum;
+ readonly GEQUAL: GLenum;
+ readonly GREATER: GLenum;
+ readonly GREEN_BITS: GLenum;
+ readonly HIGH_FLOAT: GLenum;
+ readonly HIGH_INT: GLenum;
+ readonly IMPLEMENTATION_COLOR_READ_FORMAT: GLenum;
+ readonly IMPLEMENTATION_COLOR_READ_TYPE: GLenum;
+ readonly INCR: GLenum;
+ readonly INCR_WRAP: GLenum;
+ readonly INT: GLenum;
+ readonly INT_VEC2: GLenum;
+ readonly INT_VEC3: GLenum;
+ readonly INT_VEC4: GLenum;
+ readonly INVALID_ENUM: GLenum;
+ readonly INVALID_FRAMEBUFFER_OPERATION: GLenum;
+ readonly INVALID_OPERATION: GLenum;
+ readonly INVALID_VALUE: GLenum;
+ readonly INVERT: GLenum;
+ readonly KEEP: GLenum;
+ readonly LEQUAL: GLenum;
+ readonly LESS: GLenum;
+ readonly LINEAR: GLenum;
+ readonly LINEAR_MIPMAP_LINEAR: GLenum;
+ readonly LINEAR_MIPMAP_NEAREST: GLenum;
+ readonly LINES: GLenum;
+ readonly LINE_LOOP: GLenum;
+ readonly LINE_STRIP: GLenum;
+ readonly LINE_WIDTH: GLenum;
+ readonly LINK_STATUS: GLenum;
+ readonly LOW_FLOAT: GLenum;
+ readonly LOW_INT: GLenum;
+ readonly LUMINANCE: GLenum;
+ readonly LUMINANCE_ALPHA: GLenum;
+ readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: GLenum;
+ readonly MAX_CUBE_MAP_TEXTURE_SIZE: GLenum;
+ readonly MAX_FRAGMENT_UNIFORM_VECTORS: GLenum;
+ readonly MAX_RENDERBUFFER_SIZE: GLenum;
+ readonly MAX_TEXTURE_IMAGE_UNITS: GLenum;
+ readonly MAX_TEXTURE_SIZE: GLenum;
+ readonly MAX_VARYING_VECTORS: GLenum;
+ readonly MAX_VERTEX_ATTRIBS: GLenum;
+ readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: GLenum;
+ readonly MAX_VERTEX_UNIFORM_VECTORS: GLenum;
+ readonly MAX_VIEWPORT_DIMS: GLenum;
+ readonly MEDIUM_FLOAT: GLenum;
+ readonly MEDIUM_INT: GLenum;
+ readonly MIRRORED_REPEAT: GLenum;
+ readonly NEAREST: GLenum;
+ readonly NEAREST_MIPMAP_LINEAR: GLenum;
+ readonly NEAREST_MIPMAP_NEAREST: GLenum;
+ readonly NEVER: GLenum;
+ readonly NICEST: GLenum;
+ readonly NONE: GLenum;
+ readonly NOTEQUAL: GLenum;
+ readonly NO_ERROR: GLenum;
+ readonly ONE: GLenum;
+ readonly ONE_MINUS_CONSTANT_ALPHA: GLenum;
+ readonly ONE_MINUS_CONSTANT_COLOR: GLenum;
+ readonly ONE_MINUS_DST_ALPHA: GLenum;
+ readonly ONE_MINUS_DST_COLOR: GLenum;
+ readonly ONE_MINUS_SRC_ALPHA: GLenum;
+ readonly ONE_MINUS_SRC_COLOR: GLenum;
+ readonly OUT_OF_MEMORY: GLenum;
+ readonly PACK_ALIGNMENT: GLenum;
+ readonly POINTS: GLenum;
+ readonly POLYGON_OFFSET_FACTOR: GLenum;
+ readonly POLYGON_OFFSET_FILL: GLenum;
+ readonly POLYGON_OFFSET_UNITS: GLenum;
+ readonly RED_BITS: GLenum;
+ readonly RENDERBUFFER: GLenum;
+ readonly RENDERBUFFER_ALPHA_SIZE: GLenum;
+ readonly RENDERBUFFER_BINDING: GLenum;
+ readonly RENDERBUFFER_BLUE_SIZE: GLenum;
+ readonly RENDERBUFFER_DEPTH_SIZE: GLenum;
+ readonly RENDERBUFFER_GREEN_SIZE: GLenum;
+ readonly RENDERBUFFER_HEIGHT: GLenum;
+ readonly RENDERBUFFER_INTERNAL_FORMAT: GLenum;
+ readonly RENDERBUFFER_RED_SIZE: GLenum;
+ readonly RENDERBUFFER_STENCIL_SIZE: GLenum;
+ readonly RENDERBUFFER_WIDTH: GLenum;
+ readonly RENDERER: GLenum;
+ readonly REPEAT: GLenum;
+ readonly REPLACE: GLenum;
+ readonly RGB: GLenum;
+ readonly RGB565: GLenum;
+ readonly RGB5_A1: GLenum;
+ readonly RGBA: GLenum;
+ readonly RGBA4: GLenum;
+ readonly SAMPLER_2D: GLenum;
+ readonly SAMPLER_CUBE: GLenum;
+ readonly SAMPLES: GLenum;
+ readonly SAMPLE_ALPHA_TO_COVERAGE: GLenum;
+ readonly SAMPLE_BUFFERS: GLenum;
+ readonly SAMPLE_COVERAGE: GLenum;
+ readonly SAMPLE_COVERAGE_INVERT: GLenum;
+ readonly SAMPLE_COVERAGE_VALUE: GLenum;
+ readonly SCISSOR_BOX: GLenum;
+ readonly SCISSOR_TEST: GLenum;
+ readonly SHADER_TYPE: GLenum;
+ readonly SHADING_LANGUAGE_VERSION: GLenum;
+ readonly SHORT: GLenum;
+ readonly SRC_ALPHA: GLenum;
+ readonly SRC_ALPHA_SATURATE: GLenum;
+ readonly SRC_COLOR: GLenum;
+ readonly STATIC_DRAW: GLenum;
+ readonly STENCIL_ATTACHMENT: GLenum;
+ readonly STENCIL_BACK_FAIL: GLenum;
+ readonly STENCIL_BACK_FUNC: GLenum;
+ readonly STENCIL_BACK_PASS_DEPTH_FAIL: GLenum;
+ readonly STENCIL_BACK_PASS_DEPTH_PASS: GLenum;
+ readonly STENCIL_BACK_REF: GLenum;
+ readonly STENCIL_BACK_VALUE_MASK: GLenum;
+ readonly STENCIL_BACK_WRITEMASK: GLenum;
+ readonly STENCIL_BITS: GLenum;
+ readonly STENCIL_BUFFER_BIT: GLenum;
+ readonly STENCIL_CLEAR_VALUE: GLenum;
+ readonly STENCIL_FAIL: GLenum;
+ readonly STENCIL_FUNC: GLenum;
+ readonly STENCIL_INDEX8: GLenum;
+ readonly STENCIL_PASS_DEPTH_FAIL: GLenum;
+ readonly STENCIL_PASS_DEPTH_PASS: GLenum;
+ readonly STENCIL_REF: GLenum;
+ readonly STENCIL_TEST: GLenum;
+ readonly STENCIL_VALUE_MASK: GLenum;
+ readonly STENCIL_WRITEMASK: GLenum;
+ readonly STREAM_DRAW: GLenum;
+ readonly SUBPIXEL_BITS: GLenum;
+ readonly TEXTURE: GLenum;
+ readonly TEXTURE0: GLenum;
+ readonly TEXTURE1: GLenum;
+ readonly TEXTURE10: GLenum;
+ readonly TEXTURE11: GLenum;
+ readonly TEXTURE12: GLenum;
+ readonly TEXTURE13: GLenum;
+ readonly TEXTURE14: GLenum;
+ readonly TEXTURE15: GLenum;
+ readonly TEXTURE16: GLenum;
+ readonly TEXTURE17: GLenum;
+ readonly TEXTURE18: GLenum;
+ readonly TEXTURE19: GLenum;
+ readonly TEXTURE2: GLenum;
+ readonly TEXTURE20: GLenum;
+ readonly TEXTURE21: GLenum;
+ readonly TEXTURE22: GLenum;
+ readonly TEXTURE23: GLenum;
+ readonly TEXTURE24: GLenum;
+ readonly TEXTURE25: GLenum;
+ readonly TEXTURE26: GLenum;
+ readonly TEXTURE27: GLenum;
+ readonly TEXTURE28: GLenum;
+ readonly TEXTURE29: GLenum;
+ readonly TEXTURE3: GLenum;
+ readonly TEXTURE30: GLenum;
+ readonly TEXTURE31: GLenum;
+ readonly TEXTURE4: GLenum;
+ readonly TEXTURE5: GLenum;
+ readonly TEXTURE6: GLenum;
+ readonly TEXTURE7: GLenum;
+ readonly TEXTURE8: GLenum;
+ readonly TEXTURE9: GLenum;
+ readonly TEXTURE_2D: GLenum;
+ readonly TEXTURE_BINDING_2D: GLenum;
+ readonly TEXTURE_BINDING_CUBE_MAP: GLenum;
+ readonly TEXTURE_CUBE_MAP: GLenum;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_X: GLenum;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: GLenum;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: GLenum;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_X: GLenum;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_Y: GLenum;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_Z: GLenum;
+ readonly TEXTURE_MAG_FILTER: GLenum;
+ readonly TEXTURE_MIN_FILTER: GLenum;
+ readonly TEXTURE_WRAP_S: GLenum;
+ readonly TEXTURE_WRAP_T: GLenum;
+ readonly TRIANGLES: GLenum;
+ readonly TRIANGLE_FAN: GLenum;
+ readonly TRIANGLE_STRIP: GLenum;
+ readonly UNPACK_ALIGNMENT: GLenum;
+ readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: GLenum;
+ readonly UNPACK_FLIP_Y_WEBGL: GLenum;
+ readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: GLenum;
+ readonly UNSIGNED_BYTE: GLenum;
+ readonly UNSIGNED_INT: GLenum;
+ readonly UNSIGNED_SHORT: GLenum;
+ readonly UNSIGNED_SHORT_4_4_4_4: GLenum;
+ readonly UNSIGNED_SHORT_5_5_5_1: GLenum;
+ readonly UNSIGNED_SHORT_5_6_5: GLenum;
+ readonly VALIDATE_STATUS: GLenum;
+ readonly VENDOR: GLenum;
+ readonly VERSION: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_ENABLED: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_POINTER: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_SIZE: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_STRIDE: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_TYPE: GLenum;
+ readonly VERTEX_SHADER: GLenum;
+ readonly VIEWPORT: GLenum;
+ readonly ZERO: GLenum;
+};
+
+interface WebGLRenderingContextBase {
+ readonly canvas: OffscreenCanvas;
+ readonly drawingBufferHeight: GLsizei;
+ readonly drawingBufferWidth: GLsizei;
+ activeTexture(texture: GLenum): void;
+ attachShader(program: WebGLProgram, shader: WebGLShader): void;
+ bindAttribLocation(program: WebGLProgram, index: GLuint, name: string): void;
+ bindBuffer(target: GLenum, buffer: WebGLBuffer | null): void;
+ bindFramebuffer(target: GLenum, framebuffer: WebGLFramebuffer | null): void;
+ bindRenderbuffer(target: GLenum, renderbuffer: WebGLRenderbuffer | null): void;
+ bindTexture(target: GLenum, texture: WebGLTexture | null): void;
+ blendColor(red: GLclampf, green: GLclampf, blue: GLclampf, alpha: GLclampf): void;
+ blendEquation(mode: GLenum): void;
+ blendEquationSeparate(modeRGB: GLenum, modeAlpha: GLenum): void;
+ blendFunc(sfactor: GLenum, dfactor: GLenum): void;
+ blendFuncSeparate(srcRGB: GLenum, dstRGB: GLenum, srcAlpha: GLenum, dstAlpha: GLenum): void;
+ checkFramebufferStatus(target: GLenum): GLenum;
+ clear(mask: GLbitfield): void;
+ clearColor(red: GLclampf, green: GLclampf, blue: GLclampf, alpha: GLclampf): void;
+ clearDepth(depth: GLclampf): void;
+ clearStencil(s: GLint): void;
+ colorMask(red: GLboolean, green: GLboolean, blue: GLboolean, alpha: GLboolean): void;
+ compileShader(shader: WebGLShader): void;
+ copyTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, x: GLint, y: GLint, width: GLsizei, height: GLsizei, border: GLint): void;
+ copyTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
+ createBuffer(): WebGLBuffer | null;
+ createFramebuffer(): WebGLFramebuffer | null;
+ createProgram(): WebGLProgram | null;
+ createRenderbuffer(): WebGLRenderbuffer | null;
+ createShader(type: GLenum): WebGLShader | null;
+ createTexture(): WebGLTexture | null;
+ cullFace(mode: GLenum): void;
+ deleteBuffer(buffer: WebGLBuffer | null): void;
+ deleteFramebuffer(framebuffer: WebGLFramebuffer | null): void;
+ deleteProgram(program: WebGLProgram | null): void;
+ deleteRenderbuffer(renderbuffer: WebGLRenderbuffer | null): void;
+ deleteShader(shader: WebGLShader | null): void;
+ deleteTexture(texture: WebGLTexture | null): void;
+ depthFunc(func: GLenum): void;
+ depthMask(flag: GLboolean): void;
+ depthRange(zNear: GLclampf, zFar: GLclampf): void;
+ detachShader(program: WebGLProgram, shader: WebGLShader): void;
+ disable(cap: GLenum): void;
+ disableVertexAttribArray(index: GLuint): void;
+ drawArrays(mode: GLenum, first: GLint, count: GLsizei): void;
+ drawElements(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr): void;
+ enable(cap: GLenum): void;
+ enableVertexAttribArray(index: GLuint): void;
+ finish(): void;
+ flush(): void;
+ framebufferRenderbuffer(target: GLenum, attachment: GLenum, renderbuffertarget: GLenum, renderbuffer: WebGLRenderbuffer | null): void;
+ framebufferTexture2D(target: GLenum, attachment: GLenum, textarget: GLenum, texture: WebGLTexture | null, level: GLint): void;
+ frontFace(mode: GLenum): void;
+ generateMipmap(target: GLenum): void;
+ getActiveAttrib(program: WebGLProgram, index: GLuint): WebGLActiveInfo | null;
+ getActiveUniform(program: WebGLProgram, index: GLuint): WebGLActiveInfo | null;
+ getAttachedShaders(program: WebGLProgram): WebGLShader[] | null;
+ getAttribLocation(program: WebGLProgram, name: string): GLint;
+ getBufferParameter(target: GLenum, pname: GLenum): any;
+ getContextAttributes(): WebGLContextAttributes | null;
+ getError(): GLenum;
+ getExtension(extensionName: "EXT_blend_minmax"): EXT_blend_minmax | null;
+ getExtension(extensionName: "EXT_texture_filter_anisotropic"): EXT_texture_filter_anisotropic | null;
+ getExtension(extensionName: "EXT_frag_depth"): EXT_frag_depth | null;
+ getExtension(extensionName: "EXT_shader_texture_lod"): EXT_shader_texture_lod | null;
+ getExtension(extensionName: "EXT_sRGB"): EXT_sRGB | null;
+ getExtension(extensionName: "OES_vertex_array_object"): OES_vertex_array_object | null;
+ getExtension(extensionName: "WEBGL_color_buffer_float"): WEBGL_color_buffer_float | null;
+ getExtension(extensionName: "WEBGL_compressed_texture_astc"): WEBGL_compressed_texture_astc | null;
+ getExtension(extensionName: "WEBGL_compressed_texture_s3tc_srgb"): WEBGL_compressed_texture_s3tc_srgb | null;
+ getExtension(extensionName: "WEBGL_debug_shaders"): WEBGL_debug_shaders | null;
+ getExtension(extensionName: "WEBGL_draw_buffers"): WEBGL_draw_buffers | null;
+ getExtension(extensionName: "WEBGL_lose_context"): WEBGL_lose_context | null;
+ getExtension(extensionName: "WEBGL_depth_texture"): WEBGL_depth_texture | null;
+ getExtension(extensionName: "WEBGL_debug_renderer_info"): WEBGL_debug_renderer_info | null;
+ getExtension(extensionName: "WEBGL_compressed_texture_s3tc"): WEBGL_compressed_texture_s3tc | null;
+ getExtension(extensionName: "OES_texture_half_float_linear"): OES_texture_half_float_linear | null;
+ getExtension(extensionName: "OES_texture_half_float"): OES_texture_half_float | null;
+ getExtension(extensionName: "OES_texture_float_linear"): OES_texture_float_linear | null;
+ getExtension(extensionName: "OES_texture_float"): OES_texture_float | null;
+ getExtension(extensionName: "OES_standard_derivatives"): OES_standard_derivatives | null;
+ getExtension(extensionName: "OES_element_index_uint"): OES_element_index_uint | null;
+ getExtension(extensionName: "ANGLE_instanced_arrays"): ANGLE_instanced_arrays | null;
+ getExtension(extensionName: string): any;
+ getFramebufferAttachmentParameter(target: GLenum, attachment: GLenum, pname: GLenum): any;
+ getParameter(pname: GLenum): any;
+ getProgramInfoLog(program: WebGLProgram): string | null;
+ getProgramParameter(program: WebGLProgram, pname: GLenum): any;
+ getRenderbufferParameter(target: GLenum, pname: GLenum): any;
+ getShaderInfoLog(shader: WebGLShader): string | null;
+ getShaderParameter(shader: WebGLShader, pname: GLenum): any;
+ getShaderPrecisionFormat(shadertype: GLenum, precisiontype: GLenum): WebGLShaderPrecisionFormat | null;
+ getShaderSource(shader: WebGLShader): string | null;
+ getSupportedExtensions(): string[] | null;
+ getTexParameter(target: GLenum, pname: GLenum): any;
+ getUniform(program: WebGLProgram, location: WebGLUniformLocation): any;
+ getUniformLocation(program: WebGLProgram, name: string): WebGLUniformLocation | null;
+ getVertexAttrib(index: GLuint, pname: GLenum): any;
+ getVertexAttribOffset(index: GLuint, pname: GLenum): GLintptr;
+ hint(target: GLenum, mode: GLenum): void;
+ isBuffer(buffer: WebGLBuffer | null): GLboolean;
+ isContextLost(): boolean;
+ isEnabled(cap: GLenum): GLboolean;
+ isFramebuffer(framebuffer: WebGLFramebuffer | null): GLboolean;
+ isProgram(program: WebGLProgram | null): GLboolean;
+ isRenderbuffer(renderbuffer: WebGLRenderbuffer | null): GLboolean;
+ isShader(shader: WebGLShader | null): GLboolean;
+ isTexture(texture: WebGLTexture | null): GLboolean;
+ lineWidth(width: GLfloat): void;
+ linkProgram(program: WebGLProgram): void;
+ pixelStorei(pname: GLenum, param: GLint | GLboolean): void;
+ polygonOffset(factor: GLfloat, units: GLfloat): void;
+ renderbufferStorage(target: GLenum, internalformat: GLenum, width: GLsizei, height: GLsizei): void;
+ sampleCoverage(value: GLclampf, invert: GLboolean): void;
+ scissor(x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
+ shaderSource(shader: WebGLShader, source: string): void;
+ stencilFunc(func: GLenum, ref: GLint, mask: GLuint): void;
+ stencilFuncSeparate(face: GLenum, func: GLenum, ref: GLint, mask: GLuint): void;
+ stencilMask(mask: GLuint): void;
+ stencilMaskSeparate(face: GLenum, mask: GLuint): void;
+ stencilOp(fail: GLenum, zfail: GLenum, zpass: GLenum): void;
+ stencilOpSeparate(face: GLenum, fail: GLenum, zfail: GLenum, zpass: GLenum): void;
+ texParameterf(target: GLenum, pname: GLenum, param: GLfloat): void;
+ texParameteri(target: GLenum, pname: GLenum, param: GLint): void;
+ uniform1f(location: WebGLUniformLocation | null, x: GLfloat): void;
+ uniform1i(location: WebGLUniformLocation | null, x: GLint): void;
+ uniform2f(location: WebGLUniformLocation | null, x: GLfloat, y: GLfloat): void;
+ uniform2i(location: WebGLUniformLocation | null, x: GLint, y: GLint): void;
+ uniform3f(location: WebGLUniformLocation | null, x: GLfloat, y: GLfloat, z: GLfloat): void;
+ uniform3i(location: WebGLUniformLocation | null, x: GLint, y: GLint, z: GLint): void;
+ uniform4f(location: WebGLUniformLocation | null, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat): void;
+ uniform4i(location: WebGLUniformLocation | null, x: GLint, y: GLint, z: GLint, w: GLint): void;
+ useProgram(program: WebGLProgram | null): void;
+ validateProgram(program: WebGLProgram): void;
+ vertexAttrib1f(index: GLuint, x: GLfloat): void;
+ vertexAttrib1fv(index: GLuint, values: Float32List): void;
+ vertexAttrib2f(index: GLuint, x: GLfloat, y: GLfloat): void;
+ vertexAttrib2fv(index: GLuint, values: Float32List): void;
+ vertexAttrib3f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat): void;
+ vertexAttrib3fv(index: GLuint, values: Float32List): void;
+ vertexAttrib4f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat): void;
+ vertexAttrib4fv(index: GLuint, values: Float32List): void;
+ vertexAttribPointer(index: GLuint, size: GLint, type: GLenum, normalized: GLboolean, stride: GLsizei, offset: GLintptr): void;
+ viewport(x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
+ readonly ACTIVE_ATTRIBUTES: GLenum;
+ readonly ACTIVE_TEXTURE: GLenum;
+ readonly ACTIVE_UNIFORMS: GLenum;
+ readonly ALIASED_LINE_WIDTH_RANGE: GLenum;
+ readonly ALIASED_POINT_SIZE_RANGE: GLenum;
+ readonly ALPHA: GLenum;
+ readonly ALPHA_BITS: GLenum;
+ readonly ALWAYS: GLenum;
+ readonly ARRAY_BUFFER: GLenum;
+ readonly ARRAY_BUFFER_BINDING: GLenum;
+ readonly ATTACHED_SHADERS: GLenum;
+ readonly BACK: GLenum;
+ readonly BLEND: GLenum;
+ readonly BLEND_COLOR: GLenum;
+ readonly BLEND_DST_ALPHA: GLenum;
+ readonly BLEND_DST_RGB: GLenum;
+ readonly BLEND_EQUATION: GLenum;
+ readonly BLEND_EQUATION_ALPHA: GLenum;
+ readonly BLEND_EQUATION_RGB: GLenum;
+ readonly BLEND_SRC_ALPHA: GLenum;
+ readonly BLEND_SRC_RGB: GLenum;
+ readonly BLUE_BITS: GLenum;
+ readonly BOOL: GLenum;
+ readonly BOOL_VEC2: GLenum;
+ readonly BOOL_VEC3: GLenum;
+ readonly BOOL_VEC4: GLenum;
+ readonly BROWSER_DEFAULT_WEBGL: GLenum;
+ readonly BUFFER_SIZE: GLenum;
+ readonly BUFFER_USAGE: GLenum;
+ readonly BYTE: GLenum;
+ readonly CCW: GLenum;
+ readonly CLAMP_TO_EDGE: GLenum;
+ readonly COLOR_ATTACHMENT0: GLenum;
+ readonly COLOR_BUFFER_BIT: GLenum;
+ readonly COLOR_CLEAR_VALUE: GLenum;
+ readonly COLOR_WRITEMASK: GLenum;
+ readonly COMPILE_STATUS: GLenum;
+ readonly COMPRESSED_TEXTURE_FORMATS: GLenum;
+ readonly CONSTANT_ALPHA: GLenum;
+ readonly CONSTANT_COLOR: GLenum;
+ readonly CONTEXT_LOST_WEBGL: GLenum;
+ readonly CULL_FACE: GLenum;
+ readonly CULL_FACE_MODE: GLenum;
+ readonly CURRENT_PROGRAM: GLenum;
+ readonly CURRENT_VERTEX_ATTRIB: GLenum;
+ readonly CW: GLenum;
+ readonly DECR: GLenum;
+ readonly DECR_WRAP: GLenum;
+ readonly DELETE_STATUS: GLenum;
+ readonly DEPTH_ATTACHMENT: GLenum;
+ readonly DEPTH_BITS: GLenum;
+ readonly DEPTH_BUFFER_BIT: GLenum;
+ readonly DEPTH_CLEAR_VALUE: GLenum;
+ readonly DEPTH_COMPONENT: GLenum;
+ readonly DEPTH_COMPONENT16: GLenum;
+ readonly DEPTH_FUNC: GLenum;
+ readonly DEPTH_RANGE: GLenum;
+ readonly DEPTH_STENCIL: GLenum;
+ readonly DEPTH_STENCIL_ATTACHMENT: GLenum;
+ readonly DEPTH_TEST: GLenum;
+ readonly DEPTH_WRITEMASK: GLenum;
+ readonly DITHER: GLenum;
+ readonly DONT_CARE: GLenum;
+ readonly DST_ALPHA: GLenum;
+ readonly DST_COLOR: GLenum;
+ readonly DYNAMIC_DRAW: GLenum;
+ readonly ELEMENT_ARRAY_BUFFER: GLenum;
+ readonly ELEMENT_ARRAY_BUFFER_BINDING: GLenum;
+ readonly EQUAL: GLenum;
+ readonly FASTEST: GLenum;
+ readonly FLOAT: GLenum;
+ readonly FLOAT_MAT2: GLenum;
+ readonly FLOAT_MAT3: GLenum;
+ readonly FLOAT_MAT4: GLenum;
+ readonly FLOAT_VEC2: GLenum;
+ readonly FLOAT_VEC3: GLenum;
+ readonly FLOAT_VEC4: GLenum;
+ readonly FRAGMENT_SHADER: GLenum;
+ readonly FRAMEBUFFER: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: GLenum;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: GLenum;
+ readonly FRAMEBUFFER_BINDING: GLenum;
+ readonly FRAMEBUFFER_COMPLETE: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: GLenum;
+ readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: GLenum;
+ readonly FRAMEBUFFER_UNSUPPORTED: GLenum;
+ readonly FRONT: GLenum;
+ readonly FRONT_AND_BACK: GLenum;
+ readonly FRONT_FACE: GLenum;
+ readonly FUNC_ADD: GLenum;
+ readonly FUNC_REVERSE_SUBTRACT: GLenum;
+ readonly FUNC_SUBTRACT: GLenum;
+ readonly GENERATE_MIPMAP_HINT: GLenum;
+ readonly GEQUAL: GLenum;
+ readonly GREATER: GLenum;
+ readonly GREEN_BITS: GLenum;
+ readonly HIGH_FLOAT: GLenum;
+ readonly HIGH_INT: GLenum;
+ readonly IMPLEMENTATION_COLOR_READ_FORMAT: GLenum;
+ readonly IMPLEMENTATION_COLOR_READ_TYPE: GLenum;
+ readonly INCR: GLenum;
+ readonly INCR_WRAP: GLenum;
+ readonly INT: GLenum;
+ readonly INT_VEC2: GLenum;
+ readonly INT_VEC3: GLenum;
+ readonly INT_VEC4: GLenum;
+ readonly INVALID_ENUM: GLenum;
+ readonly INVALID_FRAMEBUFFER_OPERATION: GLenum;
+ readonly INVALID_OPERATION: GLenum;
+ readonly INVALID_VALUE: GLenum;
+ readonly INVERT: GLenum;
+ readonly KEEP: GLenum;
+ readonly LEQUAL: GLenum;
+ readonly LESS: GLenum;
+ readonly LINEAR: GLenum;
+ readonly LINEAR_MIPMAP_LINEAR: GLenum;
+ readonly LINEAR_MIPMAP_NEAREST: GLenum;
+ readonly LINES: GLenum;
+ readonly LINE_LOOP: GLenum;
+ readonly LINE_STRIP: GLenum;
+ readonly LINE_WIDTH: GLenum;
+ readonly LINK_STATUS: GLenum;
+ readonly LOW_FLOAT: GLenum;
+ readonly LOW_INT: GLenum;
+ readonly LUMINANCE: GLenum;
+ readonly LUMINANCE_ALPHA: GLenum;
+ readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: GLenum;
+ readonly MAX_CUBE_MAP_TEXTURE_SIZE: GLenum;
+ readonly MAX_FRAGMENT_UNIFORM_VECTORS: GLenum;
+ readonly MAX_RENDERBUFFER_SIZE: GLenum;
+ readonly MAX_TEXTURE_IMAGE_UNITS: GLenum;
+ readonly MAX_TEXTURE_SIZE: GLenum;
+ readonly MAX_VARYING_VECTORS: GLenum;
+ readonly MAX_VERTEX_ATTRIBS: GLenum;
+ readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: GLenum;
+ readonly MAX_VERTEX_UNIFORM_VECTORS: GLenum;
+ readonly MAX_VIEWPORT_DIMS: GLenum;
+ readonly MEDIUM_FLOAT: GLenum;
+ readonly MEDIUM_INT: GLenum;
+ readonly MIRRORED_REPEAT: GLenum;
+ readonly NEAREST: GLenum;
+ readonly NEAREST_MIPMAP_LINEAR: GLenum;
+ readonly NEAREST_MIPMAP_NEAREST: GLenum;
+ readonly NEVER: GLenum;
+ readonly NICEST: GLenum;
+ readonly NONE: GLenum;
+ readonly NOTEQUAL: GLenum;
+ readonly NO_ERROR: GLenum;
+ readonly ONE: GLenum;
+ readonly ONE_MINUS_CONSTANT_ALPHA: GLenum;
+ readonly ONE_MINUS_CONSTANT_COLOR: GLenum;
+ readonly ONE_MINUS_DST_ALPHA: GLenum;
+ readonly ONE_MINUS_DST_COLOR: GLenum;
+ readonly ONE_MINUS_SRC_ALPHA: GLenum;
+ readonly ONE_MINUS_SRC_COLOR: GLenum;
+ readonly OUT_OF_MEMORY: GLenum;
+ readonly PACK_ALIGNMENT: GLenum;
+ readonly POINTS: GLenum;
+ readonly POLYGON_OFFSET_FACTOR: GLenum;
+ readonly POLYGON_OFFSET_FILL: GLenum;
+ readonly POLYGON_OFFSET_UNITS: GLenum;
+ readonly RED_BITS: GLenum;
+ readonly RENDERBUFFER: GLenum;
+ readonly RENDERBUFFER_ALPHA_SIZE: GLenum;
+ readonly RENDERBUFFER_BINDING: GLenum;
+ readonly RENDERBUFFER_BLUE_SIZE: GLenum;
+ readonly RENDERBUFFER_DEPTH_SIZE: GLenum;
+ readonly RENDERBUFFER_GREEN_SIZE: GLenum;
+ readonly RENDERBUFFER_HEIGHT: GLenum;
+ readonly RENDERBUFFER_INTERNAL_FORMAT: GLenum;
+ readonly RENDERBUFFER_RED_SIZE: GLenum;
+ readonly RENDERBUFFER_STENCIL_SIZE: GLenum;
+ readonly RENDERBUFFER_WIDTH: GLenum;
+ readonly RENDERER: GLenum;
+ readonly REPEAT: GLenum;
+ readonly REPLACE: GLenum;
+ readonly RGB: GLenum;
+ readonly RGB565: GLenum;
+ readonly RGB5_A1: GLenum;
+ readonly RGBA: GLenum;
+ readonly RGBA4: GLenum;
+ readonly SAMPLER_2D: GLenum;
+ readonly SAMPLER_CUBE: GLenum;
+ readonly SAMPLES: GLenum;
+ readonly SAMPLE_ALPHA_TO_COVERAGE: GLenum;
+ readonly SAMPLE_BUFFERS: GLenum;
+ readonly SAMPLE_COVERAGE: GLenum;
+ readonly SAMPLE_COVERAGE_INVERT: GLenum;
+ readonly SAMPLE_COVERAGE_VALUE: GLenum;
+ readonly SCISSOR_BOX: GLenum;
+ readonly SCISSOR_TEST: GLenum;
+ readonly SHADER_TYPE: GLenum;
+ readonly SHADING_LANGUAGE_VERSION: GLenum;
+ readonly SHORT: GLenum;
+ readonly SRC_ALPHA: GLenum;
+ readonly SRC_ALPHA_SATURATE: GLenum;
+ readonly SRC_COLOR: GLenum;
+ readonly STATIC_DRAW: GLenum;
+ readonly STENCIL_ATTACHMENT: GLenum;
+ readonly STENCIL_BACK_FAIL: GLenum;
+ readonly STENCIL_BACK_FUNC: GLenum;
+ readonly STENCIL_BACK_PASS_DEPTH_FAIL: GLenum;
+ readonly STENCIL_BACK_PASS_DEPTH_PASS: GLenum;
+ readonly STENCIL_BACK_REF: GLenum;
+ readonly STENCIL_BACK_VALUE_MASK: GLenum;
+ readonly STENCIL_BACK_WRITEMASK: GLenum;
+ readonly STENCIL_BITS: GLenum;
+ readonly STENCIL_BUFFER_BIT: GLenum;
+ readonly STENCIL_CLEAR_VALUE: GLenum;
+ readonly STENCIL_FAIL: GLenum;
+ readonly STENCIL_FUNC: GLenum;
+ readonly STENCIL_INDEX8: GLenum;
+ readonly STENCIL_PASS_DEPTH_FAIL: GLenum;
+ readonly STENCIL_PASS_DEPTH_PASS: GLenum;
+ readonly STENCIL_REF: GLenum;
+ readonly STENCIL_TEST: GLenum;
+ readonly STENCIL_VALUE_MASK: GLenum;
+ readonly STENCIL_WRITEMASK: GLenum;
+ readonly STREAM_DRAW: GLenum;
+ readonly SUBPIXEL_BITS: GLenum;
+ readonly TEXTURE: GLenum;
+ readonly TEXTURE0: GLenum;
+ readonly TEXTURE1: GLenum;
+ readonly TEXTURE10: GLenum;
+ readonly TEXTURE11: GLenum;
+ readonly TEXTURE12: GLenum;
+ readonly TEXTURE13: GLenum;
+ readonly TEXTURE14: GLenum;
+ readonly TEXTURE15: GLenum;
+ readonly TEXTURE16: GLenum;
+ readonly TEXTURE17: GLenum;
+ readonly TEXTURE18: GLenum;
+ readonly TEXTURE19: GLenum;
+ readonly TEXTURE2: GLenum;
+ readonly TEXTURE20: GLenum;
+ readonly TEXTURE21: GLenum;
+ readonly TEXTURE22: GLenum;
+ readonly TEXTURE23: GLenum;
+ readonly TEXTURE24: GLenum;
+ readonly TEXTURE25: GLenum;
+ readonly TEXTURE26: GLenum;
+ readonly TEXTURE27: GLenum;
+ readonly TEXTURE28: GLenum;
+ readonly TEXTURE29: GLenum;
+ readonly TEXTURE3: GLenum;
+ readonly TEXTURE30: GLenum;
+ readonly TEXTURE31: GLenum;
+ readonly TEXTURE4: GLenum;
+ readonly TEXTURE5: GLenum;
+ readonly TEXTURE6: GLenum;
+ readonly TEXTURE7: GLenum;
+ readonly TEXTURE8: GLenum;
+ readonly TEXTURE9: GLenum;
+ readonly TEXTURE_2D: GLenum;
+ readonly TEXTURE_BINDING_2D: GLenum;
+ readonly TEXTURE_BINDING_CUBE_MAP: GLenum;
+ readonly TEXTURE_CUBE_MAP: GLenum;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_X: GLenum;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: GLenum;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: GLenum;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_X: GLenum;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_Y: GLenum;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_Z: GLenum;
+ readonly TEXTURE_MAG_FILTER: GLenum;
+ readonly TEXTURE_MIN_FILTER: GLenum;
+ readonly TEXTURE_WRAP_S: GLenum;
+ readonly TEXTURE_WRAP_T: GLenum;
+ readonly TRIANGLES: GLenum;
+ readonly TRIANGLE_FAN: GLenum;
+ readonly TRIANGLE_STRIP: GLenum;
+ readonly UNPACK_ALIGNMENT: GLenum;
+ readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: GLenum;
+ readonly UNPACK_FLIP_Y_WEBGL: GLenum;
+ readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: GLenum;
+ readonly UNSIGNED_BYTE: GLenum;
+ readonly UNSIGNED_INT: GLenum;
+ readonly UNSIGNED_SHORT: GLenum;
+ readonly UNSIGNED_SHORT_4_4_4_4: GLenum;
+ readonly UNSIGNED_SHORT_5_5_5_1: GLenum;
+ readonly UNSIGNED_SHORT_5_6_5: GLenum;
+ readonly VALIDATE_STATUS: GLenum;
+ readonly VENDOR: GLenum;
+ readonly VERSION: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_ENABLED: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_POINTER: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_SIZE: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_STRIDE: GLenum;
+ readonly VERTEX_ATTRIB_ARRAY_TYPE: GLenum;
+ readonly VERTEX_SHADER: GLenum;
+ readonly VIEWPORT: GLenum;
+ readonly ZERO: GLenum;
+}
+
+interface WebGLRenderingContextOverloads {
+ bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum): void;
+ bufferData(target: GLenum, data: BufferSource | null, usage: GLenum): void;
+ bufferSubData(target: GLenum, offset: GLintptr, data: BufferSource): void;
+ compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, data: ArrayBufferView): void;
+ compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, data: ArrayBufferView): void;
+ readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
+ texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
+ texImage2D(target: GLenum, level: GLint, internalformat: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
+ texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
+ texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
+ uniform1fv(location: WebGLUniformLocation | null, v: Float32List): void;
+ uniform1iv(location: WebGLUniformLocation | null, v: Int32List): void;
+ uniform2fv(location: WebGLUniformLocation | null, v: Float32List): void;
+ uniform2iv(location: WebGLUniformLocation | null, v: Int32List): void;
+ uniform3fv(location: WebGLUniformLocation | null, v: Float32List): void;
+ uniform3iv(location: WebGLUniformLocation | null, v: Int32List): void;
+ uniform4fv(location: WebGLUniformLocation | null, v: Float32List): void;
+ uniform4iv(location: WebGLUniformLocation | null, v: Int32List): void;
+ uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void;
+ uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void;
+ uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void;
+}
+
+interface WebGLSampler extends WebGLObject {
+}
+
+declare var WebGLSampler: {
+ prototype: WebGLSampler;
+ new(): WebGLSampler;
+};
+
+/** The WebGLShader is part of the WebGL API and can either be a vertex or a fragment shader. A WebGLProgram requires both types of shaders. */
+interface WebGLShader extends WebGLObject {
+}
+
+declare var WebGLShader: {
+ prototype: WebGLShader;
+ new(): WebGLShader;
+};
+
+/** Part of the WebGL API and represents the information returned by calling the WebGLRenderingContext.getShaderPrecisionFormat() method. */
+interface WebGLShaderPrecisionFormat {
+ readonly precision: GLint;
+ readonly rangeMax: GLint;
+ readonly rangeMin: GLint;
+}
+
+declare var WebGLShaderPrecisionFormat: {
+ prototype: WebGLShaderPrecisionFormat;
+ new(): WebGLShaderPrecisionFormat;
+};
+
+interface WebGLSync extends WebGLObject {
+}
+
+declare var WebGLSync: {
+ prototype: WebGLSync;
+ new(): WebGLSync;
+};
+
+/** Part of the WebGL API and represents an opaque texture object providing storage and state for texturing operations. */
+interface WebGLTexture extends WebGLObject {
+}
+
+declare var WebGLTexture: {
+ prototype: WebGLTexture;
+ new(): WebGLTexture;
+};
+
+interface WebGLTransformFeedback extends WebGLObject {
+}
+
+declare var WebGLTransformFeedback: {
+ prototype: WebGLTransformFeedback;
+ new(): WebGLTransformFeedback;
+};
+
+/** Part of the WebGL API and represents the location of a uniform variable in a shader program. */
+interface WebGLUniformLocation {
+}
+
+declare var WebGLUniformLocation: {
+ prototype: WebGLUniformLocation;
+ new(): WebGLUniformLocation;
+};
+
+interface WebGLVertexArrayObject extends WebGLObject {
+}
+
+declare var WebGLVertexArrayObject: {
+ prototype: WebGLVertexArrayObject;
+ new(): WebGLVertexArrayObject;
+};
+
+interface WebGLVertexArrayObjectOES extends WebGLObject {
+}
+
+interface WebSocketEventMap {
+ "close": CloseEvent;
+ "error": Event;
+ "message": MessageEvent;
+ "open": Event;
+}
+
+/** Provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection. */
+interface WebSocket extends EventTarget {
+ /**
+ * Returns a string that indicates how binary data from the WebSocket object is exposed to scripts:
+ *
+ * Can be set, to change how binary data is returned. The default is "blob".
+ */
+ binaryType: BinaryType;
+ /**
+ * Returns the number of bytes of application data (UTF-8 text and binary data) that have been queued using send() but not yet been transmitted to the network.
+ *
+ * If the WebSocket connection is closed, this attribute's value will only increase with each call to the send() method. (The number does not reset to zero once the connection closes.)
+ */
+ readonly bufferedAmount: number;
+ /**
+ * Returns the extensions selected by the server, if any.
+ */
+ readonly extensions: string;
+ onclose: ((this: WebSocket, ev: CloseEvent) => any) | null;
+ onerror: ((this: WebSocket, ev: Event) => any) | null;
+ onmessage: ((this: WebSocket, ev: MessageEvent) => any) | null;
+ onopen: ((this: WebSocket, ev: Event) => any) | null;
+ /**
+ * Returns the subprotocol selected by the server, if any. It can be used in conjunction with the array form of the constructor's second argument to perform subprotocol negotiation.
+ */
+ readonly protocol: string;
+ /**
+ * Returns the state of the WebSocket object's connection. It can have the values described below.
+ */
+ readonly readyState: number;
+ /**
+ * Returns the URL that was used to establish the WebSocket connection.
+ */
+ readonly url: string;
+ /**
+ * Closes the WebSocket connection, optionally using code as the the WebSocket connection close code and reason as the the WebSocket connection close reason.
+ */
+ close(code?: number, reason?: string): void;
+ /**
+ * Transmits data using the WebSocket connection. data can be a string, a Blob, an ArrayBuffer, or an ArrayBufferView.
+ */
+ send(data: string | ArrayBufferLike | Blob | ArrayBufferView): void;
+ readonly CLOSED: number;
+ readonly CLOSING: number;
+ readonly CONNECTING: number;
+ readonly OPEN: number;
+ addEventListener<K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var WebSocket: {
+ prototype: WebSocket;
+ new(url: string, protocols?: string | string[]): WebSocket;
+ readonly CLOSED: number;
+ readonly CLOSING: number;
+ readonly CONNECTING: number;
+ readonly OPEN: number;
+};
+
+/** This ServiceWorker API interface represents the scope of a service worker client that is a document in a browser context, controlled by an active worker. The service worker client independently selects and uses a service worker for its own loading and sub-resources. */
+interface WindowClient extends Client {
+ readonly ancestorOrigins: ReadonlyArray<string>;
+ readonly focused: boolean;
+ readonly visibilityState: VisibilityState;
+ focus(): Promise<WindowClient>;
+ navigate(url: string): Promise<WindowClient | null>;
+}
+
+declare var WindowClient: {
+ prototype: WindowClient;
+ new(): WindowClient;
+};
+
+interface WindowOrWorkerGlobalScope {
+ readonly caches: CacheStorage;
+ readonly crypto: Crypto;
+ readonly indexedDB: IDBFactory;
+ readonly isSecureContext: boolean;
+ readonly origin: string;
+ readonly performance: Performance;
+ atob(data: string): string;
+ btoa(data: string): string;
+ clearInterval(handle?: number): void;
+ clearTimeout(handle?: number): void;
+ createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
+ createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
+ fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
+ queueMicrotask(callback: VoidFunction): void;
+ setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
+ setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
+}
+
+interface WorkerEventMap extends AbstractWorkerEventMap {
+ "message": MessageEvent;
+ "messageerror": MessageEvent;
+}
+
+/** This Web Workers API interface represents a background task that can be easily created and can send messages back to its creator. Creating a worker is as simple as calling the Worker() constructor and specifying a script to be run in the worker thread. */
+interface Worker extends EventTarget, AbstractWorker {
+ onmessage: ((this: Worker, ev: MessageEvent) => any) | null;
+ onmessageerror: ((this: Worker, ev: MessageEvent) => any) | null;
+ /**
+ * Clones message and transmits it to worker's global environment. transfer can be passed as a list of objects that are to be transferred rather than cloned.
+ */
+ postMessage(message: any, transfer: Transferable[]): void;
+ postMessage(message: any, options?: PostMessageOptions): void;
+ /**
+ * Aborts worker's associated global environment.
+ */
+ terminate(): void;
+ addEventListener<K extends keyof WorkerEventMap>(type: K, listener: (this: Worker, ev: WorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof WorkerEventMap>(type: K, listener: (this: Worker, ev: WorkerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var Worker: {
+ prototype: Worker;
+ new(stringUrl: string | URL, options?: WorkerOptions): Worker;
+};
+
+interface WorkerGlobalScopeEventMap {
+ "error": ErrorEvent;
+ "languagechange": Event;
+ "offline": Event;
+ "online": Event;
+ "rejectionhandled": PromiseRejectionEvent;
+ "unhandledrejection": PromiseRejectionEvent;
+}
+
+/** This Web Workers API interface is an interface representing the scope of any worker. Workers have no browsing context; this scope contains the information usually conveyed by Window objects — in this case event handlers, the console or the associated WorkerNavigator object. Each WorkerGlobalScope has its own event loop. */
+interface WorkerGlobalScope extends EventTarget, WindowOrWorkerGlobalScope {
+ /**
+ * Returns workerGlobal's WorkerLocation object.
+ */
+ readonly location: WorkerLocation;
+ readonly navigator: WorkerNavigator;
+ onerror: ((this: WorkerGlobalScope, ev: ErrorEvent) => any) | null;
+ onlanguagechange: ((this: WorkerGlobalScope, ev: Event) => any) | null;
+ onoffline: ((this: WorkerGlobalScope, ev: Event) => any) | null;
+ ononline: ((this: WorkerGlobalScope, ev: Event) => any) | null;
+ onrejectionhandled: ((this: WorkerGlobalScope, ev: PromiseRejectionEvent) => any) | null;
+ onunhandledrejection: ((this: WorkerGlobalScope, ev: PromiseRejectionEvent) => any) | null;
+ /**
+ * Returns workerGlobal.
+ */
+ readonly self: WorkerGlobalScope & typeof globalThis;
+ /**
+ * Fetches each URL in urls, executes them one-by-one in the order they are passed, and then returns (or throws if something went amiss).
+ */
+ importScripts(...urls: string[]): void;
+ addEventListener<K extends keyof WorkerGlobalScopeEventMap>(type: K, listener: (this: WorkerGlobalScope, ev: WorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof WorkerGlobalScopeEventMap>(type: K, listener: (this: WorkerGlobalScope, ev: WorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var WorkerGlobalScope: {
+ prototype: WorkerGlobalScope;
+ new(): WorkerGlobalScope;
+};
+
+/** The absolute location of the script executed by the Worker. Such an object is initialized for each worker and is available via the WorkerGlobalScope.location property obtained by calling self.location. */
+interface WorkerLocation {
+ readonly hash: string;
+ readonly host: string;
+ readonly hostname: string;
+ readonly href: string;
+ toString(): string;
+ readonly origin: string;
+ readonly pathname: string;
+ readonly port: string;
+ readonly protocol: string;
+ readonly search: string;
+}
+
+declare var WorkerLocation: {
+ prototype: WorkerLocation;
+ new(): WorkerLocation;
+};
+
+/** A subset of the Navigator interface allowed to be accessed from a Worker. Such an object is initialized for each worker and is available via the WorkerGlobalScope.navigator property obtained by calling window.self.navigator. */
+interface WorkerNavigator extends NavigatorConcurrentHardware, NavigatorID, NavigatorLanguage, NavigatorOnLine, NavigatorStorage {
+ readonly permissions: Permissions;
+ readonly serviceWorker: ServiceWorkerContainer;
+}
+
+declare var WorkerNavigator: {
+ prototype: WorkerNavigator;
+ new(): WorkerNavigator;
+};
+
+/** This Streams API interface provides a standard abstraction for writing streaming data to a destination, known as a sink. This object comes with built-in backpressure and queuing. */
+interface WritableStream<W = any> {
+ readonly locked: boolean;
+ abort(reason?: any): Promise<void>;
+ getWriter(): WritableStreamDefaultWriter<W>;
+}
+
+declare var WritableStream: {
+ prototype: WritableStream;
+ new<W = any>(underlyingSink?: UnderlyingSink<W>, strategy?: QueuingStrategy<W>): WritableStream<W>;
+};
+
+/** This Streams API interface 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. */
+interface WritableStreamDefaultController {
+ error(error?: any): void;
+}
+
+/** This Streams API interface 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. */
+interface WritableStreamDefaultWriter<W = any> {
+ readonly closed: Promise<void>;
+ readonly desiredSize: number | null;
+ readonly ready: Promise<void>;
+ abort(reason?: any): Promise<void>;
+ close(): Promise<void>;
+ releaseLock(): void;
+ write(chunk: W): Promise<void>;
+}
+
+interface XMLHttpRequestEventMap extends XMLHttpRequestEventTargetEventMap {
+ "readystatechange": Event;
+}
+
+/** Use XMLHttpRequest (XHR) objects to interact with servers. You can retrieve data from a URL without having to do a full page refresh. This enables a Web page to update just part of a page without disrupting what the user is doing. */
+interface XMLHttpRequest extends XMLHttpRequestEventTarget {
+ onreadystatechange: ((this: XMLHttpRequest, ev: Event) => any) | null;
+ /**
+ * Returns client's state.
+ */
+ readonly readyState: number;
+ /**
+ * Returns the response's body.
+ */
+ readonly response: any;
+ /**
+ * Returns the text response.
+ *
+ * Throws an "InvalidStateError" DOMException if responseType is not the empty string or "text".
+ */
+ readonly responseText: string;
+ /**
+ * Returns the response type.
+ *
+ * Can be set to change the response type. Values are: the empty string (default), "arraybuffer", "blob", "document", "json", and "text".
+ *
+ * When set: setting to "document" is ignored if current global object is not a Window object.
+ *
+ * When set: throws an "InvalidStateError" DOMException if state is loading or done.
+ *
+ * When set: throws an "InvalidAccessError" DOMException if the synchronous flag is set and current global object is a Window object.
+ */
+ responseType: XMLHttpRequestResponseType;
+ readonly responseURL: string;
+ readonly status: number;
+ readonly statusText: string;
+ /**
+ * Can be set to a time in milliseconds. When set to a non-zero value will cause fetching to terminate after the given time has passed. When the time has passed, the request has not yet completed, and the synchronous flag is unset, a timeout event will then be dispatched, or a "TimeoutError" DOMException will be thrown otherwise (for the send() method).
+ *
+ * When set: throws an "InvalidAccessError" DOMException if the synchronous flag is set and current global object is a Window object.
+ */
+ timeout: number;
+ /**
+ * Returns the associated XMLHttpRequestUpload object. It can be used to gather transmission information when data is transferred to a server.
+ */
+ readonly upload: XMLHttpRequestUpload;
+ /**
+ * True when credentials are to be included in a cross-origin request. False when they are to be excluded in a cross-origin request and when cookies are to be ignored in its response. Initially false.
+ *
+ * When set: throws an "InvalidStateError" DOMException if state is not unsent or opened, or if the send() flag is set.
+ */
+ withCredentials: boolean;
+ /**
+ * Cancels any network activity.
+ */
+ abort(): void;
+ getAllResponseHeaders(): string;
+ getResponseHeader(name: string): string | null;
+ /**
+ * Sets the request method, request URL, and synchronous flag.
+ *
+ * Throws a "SyntaxError" DOMException if either method is not a valid HTTP method or url cannot be parsed.
+ *
+ * Throws a "SecurityError" DOMException if method is a case-insensitive match for `CONNECT`, `TRACE`, or `TRACK`.
+ *
+ * Throws an "InvalidAccessError" DOMException if async is false, current global object is a Window object, and the timeout attribute is not zero or the responseType attribute is not the empty string.
+ */
+ open(method: string, url: string): void;
+ open(method: string, url: string, async: boolean, username?: string | null, password?: string | null): void;
+ /**
+ * Acts as if the `Content-Type` header value for response is mime. (It does not actually change the header though.)
+ *
+ * Throws an "InvalidStateError" DOMException if state is loading or done.
+ */
+ overrideMimeType(mime: string): void;
+ /**
+ * Initiates the request. The body argument provides the request body, if any, and is ignored if the request method is GET or HEAD.
+ *
+ * Throws an "InvalidStateError" DOMException if either state is not opened or the send() flag is set.
+ */
+ send(body?: BodyInit | null): void;
+ /**
+ * Combines a header in author request headers.
+ *
+ * Throws an "InvalidStateError" DOMException if either state is not opened or the send() flag is set.
+ *
+ * Throws a "SyntaxError" DOMException if name is not a header name or if value is not a header value.
+ */
+ setRequestHeader(name: string, value: string): void;
+ readonly DONE: number;
+ readonly HEADERS_RECEIVED: number;
+ readonly LOADING: number;
+ readonly OPENED: number;
+ readonly UNSENT: number;
+ addEventListener<K extends keyof XMLHttpRequestEventMap>(type: K, listener: (this: XMLHttpRequest, ev: XMLHttpRequestEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof XMLHttpRequestEventMap>(type: K, listener: (this: XMLHttpRequest, ev: XMLHttpRequestEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var XMLHttpRequest: {
+ prototype: XMLHttpRequest;
+ new(): XMLHttpRequest;
+ readonly DONE: number;
+ readonly HEADERS_RECEIVED: number;
+ readonly LOADING: number;
+ readonly OPENED: number;
+ readonly UNSENT: number;
+};
+
+interface XMLHttpRequestEventTargetEventMap {
+ "abort": ProgressEvent<XMLHttpRequestEventTarget>;
+ "error": ProgressEvent<XMLHttpRequestEventTarget>;
+ "load": ProgressEvent<XMLHttpRequestEventTarget>;
+ "loadend": ProgressEvent<XMLHttpRequestEventTarget>;
+ "loadstart": ProgressEvent<XMLHttpRequestEventTarget>;
+ "progress": ProgressEvent<XMLHttpRequestEventTarget>;
+ "timeout": ProgressEvent<XMLHttpRequestEventTarget>;
+}
+
+interface XMLHttpRequestEventTarget extends EventTarget {
+ onabort: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
+ onerror: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
+ onload: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
+ onloadend: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
+ onloadstart: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
+ onprogress: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
+ ontimeout: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
+ addEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestEventTarget, ev: XMLHttpRequestEventTargetEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestEventTarget, ev: XMLHttpRequestEventTargetEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var XMLHttpRequestEventTarget: {
+ prototype: XMLHttpRequestEventTarget;
+ new(): XMLHttpRequestEventTarget;
+};
+
+interface XMLHttpRequestUpload extends XMLHttpRequestEventTarget {
+ addEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestUpload, ev: XMLHttpRequestEventTargetEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+ removeEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestUpload, ev: XMLHttpRequestEventTargetEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+}
+
+declare var XMLHttpRequestUpload: {
+ prototype: XMLHttpRequestUpload;
+ new(): XMLHttpRequestUpload;
+};
+
+declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
+
+interface Console {
+ memory: any;
+ assert(condition?: boolean, ...data: any[]): void;
+ clear(): void;
+ count(label?: string): void;
+ countReset(label?: string): void;
+ debug(...data: any[]): void;
+ dir(item?: any, options?: any): void;
+ dirxml(...data: any[]): void;
+ error(...data: any[]): void;
+ exception(message?: string, ...optionalParams: any[]): void;
+ group(...data: any[]): void;
+ groupCollapsed(...data: any[]): void;
+ groupEnd(): void;
+ info(...data: any[]): void;
+ log(...data: any[]): void;
+ table(tabularData?: any, properties?: string[]): void;
+ time(label?: string): void;
+ timeEnd(label?: string): void;
+ timeLog(label?: string, ...data: any[]): void;
+ timeStamp(label?: string): void;
+ trace(...data: any[]): void;
+ warn(...data: any[]): void;
+}
+
+declare var console: Console;
+
+declare namespace WebAssembly {
+ interface Global {
+ value: any;
+ valueOf(): any;
+ }
+
+ var Global: {
+ prototype: Global;
+ new(descriptor: GlobalDescriptor, v?: any): Global;
+ };
+
+ interface Instance {
+ readonly exports: Exports;
+ }
+
+ var Instance: {
+ prototype: Instance;
+ new(module: Module, importObject?: Imports): Instance;
+ };
+
+ interface Memory {
+ readonly buffer: ArrayBuffer;
+ grow(delta: number): number;
+ }
+
+ var Memory: {
+ prototype: Memory;
+ new(descriptor: MemoryDescriptor): Memory;
+ };
+
+ interface Module {
+ }
+
+ var Module: {
+ prototype: Module;
+ new(bytes: BufferSource): Module;
+ customSections(moduleObject: Module, sectionName: string): ArrayBuffer[];
+ exports(moduleObject: Module): ModuleExportDescriptor[];
+ imports(moduleObject: Module): ModuleImportDescriptor[];
+ };
+
+ interface Table {
+ readonly length: number;
+ get(index: number): Function | null;
+ grow(delta: number): number;
+ set(index: number, value: Function | null): void;
+ }
+
+ var Table: {
+ prototype: Table;
+ new(descriptor: TableDescriptor): Table;
+ };
+
+ interface GlobalDescriptor {
+ mutable?: boolean;
+ value: ValueType;
+ }
+
+ interface MemoryDescriptor {
+ initial: number;
+ maximum?: number;
+ }
+
+ interface ModuleExportDescriptor {
+ kind: ImportExportKind;
+ name: string;
+ }
+
+ interface ModuleImportDescriptor {
+ kind: ImportExportKind;
+ module: string;
+ name: string;
+ }
+
+ interface TableDescriptor {
+ element: TableKind;
+ initial: number;
+ maximum?: number;
+ }
+
+ interface WebAssemblyInstantiatedSource {
+ instance: Instance;
+ module: Module;
+ }
+
+ type ImportExportKind = "function" | "global" | "memory" | "table";
+ type TableKind = "anyfunc";
+ type ValueType = "f32" | "f64" | "i32" | "i64";
+ type ExportValue = Function | Global | Memory | Table;
+ type Exports = Record<string, ExportValue>;
+ type ImportValue = ExportValue | number;
+ type ModuleImports = Record<string, ImportValue>;
+ type Imports = Record<string, ModuleImports>;
+ function compile(bytes: BufferSource): Promise<Module>;
+ function compileStreaming(source: Response | Promise<Response>): Promise<Module>;
+ function instantiate(bytes: BufferSource, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
+ function instantiate(moduleObject: Module, importObject?: Imports): Promise<Instance>;
+ function instantiateStreaming(response: Response | PromiseLike<Response>, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
+ function validate(bytes: BufferSource): boolean;
+}
+
+interface FrameRequestCallback {
+ (time: number): void;
+}
+
+interface OnErrorEventHandlerNonNull {
+ (event: Event | string, source?: string, lineno?: number, colno?: number, error?: Error): any;
+}
+
+interface PerformanceObserverCallback {
+ (entries: PerformanceObserverEntryList, observer: PerformanceObserver): void;
+}
+
+interface QueuingStrategySizeCallback<T = any> {
+ (chunk: T): number;
+}
+
+interface ReadableByteStreamControllerCallback {
+ (controller: ReadableByteStreamController): void | PromiseLike<void>;
+}
+
+interface ReadableStreamDefaultControllerCallback<R> {
+ (controller: ReadableStreamDefaultController<R>): void | PromiseLike<void>;
+}
+
+interface ReadableStreamErrorCallback {
+ (reason: any): void | PromiseLike<void>;
+}
+
+interface TransformStreamDefaultControllerCallback<O> {
+ (controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
+}
+
+interface TransformStreamDefaultControllerTransformCallback<I, O> {
+ (chunk: I, controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
+}
+
+interface VoidFunction {
+ (): void;
+}
+
+interface WritableStreamDefaultControllerCloseCallback {
+ (): void | PromiseLike<void>;
+}
+
+interface WritableStreamDefaultControllerStartCallback {
+ (controller: WritableStreamDefaultController): void | PromiseLike<void>;
+}
+
+interface WritableStreamDefaultControllerWriteCallback<W> {
+ (chunk: W, controller: WritableStreamDefaultController): void | PromiseLike<void>;
+}
+
+interface WritableStreamErrorCallback {
+ (reason: any): void | PromiseLike<void>;
+}
+
+/**
+ * Returns dedicatedWorkerGlobal's name, i.e. the value given to the Worker constructor. Primarily useful for debugging.
+ */
+declare var name: string;
+declare var onmessage: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null;
+declare var onmessageerror: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null;
+/**
+ * Aborts dedicatedWorkerGlobal.
+ */
+declare function close(): void;
+/**
+ * Clones message and transmits it to the Worker object associated with dedicatedWorkerGlobal. transfer can be passed as a list of objects that are to be transferred rather than cloned.
+ */
+declare function postMessage(message: any, transfer: Transferable[]): void;
+declare function postMessage(message: any, options?: PostMessageOptions): void;
+/**
+ * Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
+ */
+declare function dispatchEvent(event: Event): boolean;
+/**
+ * Returns workerGlobal's WorkerLocation object.
+ */
+declare var location: WorkerLocation;
+declare var navigator: WorkerNavigator;
+declare var onerror: ((this: DedicatedWorkerGlobalScope, ev: ErrorEvent) => any) | null;
+declare var onlanguagechange: ((this: DedicatedWorkerGlobalScope, ev: Event) => any) | null;
+declare var onoffline: ((this: DedicatedWorkerGlobalScope, ev: Event) => any) | null;
+declare var ononline: ((this: DedicatedWorkerGlobalScope, ev: Event) => any) | null;
+declare var onrejectionhandled: ((this: DedicatedWorkerGlobalScope, ev: PromiseRejectionEvent) => any) | null;
+declare var onunhandledrejection: ((this: DedicatedWorkerGlobalScope, ev: PromiseRejectionEvent) => any) | null;
+/**
+ * Returns workerGlobal.
+ */
+declare var self: WorkerGlobalScope & typeof globalThis;
+/**
+ * Fetches each URL in urls, executes them one-by-one in the order they are passed, and then returns (or throws if something went amiss).
+ */
+declare function importScripts(...urls: string[]): void;
+/**
+ * Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
+ */
+declare function dispatchEvent(event: Event): boolean;
+declare var caches: CacheStorage;
+declare var crypto: Crypto;
+declare var indexedDB: IDBFactory;
+declare var isSecureContext: boolean;
+declare var origin: string;
+declare var performance: Performance;
+declare function atob(data: string): string;
+declare function btoa(data: string): string;
+declare function clearInterval(handle?: number): void;
+declare function clearTimeout(handle?: number): void;
+declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
+declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
+declare function fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
+declare function queueMicrotask(callback: VoidFunction): void;
+declare function setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
+declare function setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
+declare function cancelAnimationFrame(handle: number): void;
+declare function requestAnimationFrame(callback: FrameRequestCallback): number;
+declare function addEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
+declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
+declare function removeEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
+declare function removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
+type HeadersInit = Headers | string[][] | Record<string, string>;
+type BodyInit = Blob | BufferSource | FormData | URLSearchParams | ReadableStream<Uint8Array> | string;
+type RequestInfo = Request | string;
+type BlobPart = BufferSource | Blob | string;
+type DOMHighResTimeStamp = number;
+type CanvasImageSource = ImageBitmap | OffscreenCanvas;
+type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext;
+type MessageEventSource = MessagePort | ServiceWorker;
+type ImageBitmapSource = CanvasImageSource | Blob | ImageData;
+type OnErrorEventHandler = OnErrorEventHandlerNonNull | null;
+type TimerHandler = string | Function;
+type PerformanceEntryList = PerformanceEntry[];
+type PushMessageDataInit = BufferSource | string;
+type ReadableStreamReadResult<T> = ReadableStreamReadValueResult<T> | ReadableStreamReadDoneResult<T>;
+type VibratePattern = number | number[];
+type AlgorithmIdentifier = string | Algorithm;
+type HashAlgorithmIdentifier = AlgorithmIdentifier;
+type BigInteger = Uint8Array;
+type NamedCurve = string;
+type GLenum = number;
+type GLboolean = boolean;
+type GLbitfield = number;
+type GLint = number;
+type GLsizei = number;
+type GLintptr = number;
+type GLsizeiptr = number;
+type GLuint = number;
+type GLfloat = number;
+type GLclampf = number;
+type TexImageSource = ImageBitmap | ImageData | OffscreenCanvas;
+type Float32List = Float32Array | GLfloat[];
+type Int32List = Int32Array | GLint[];
+type GLint64 = number;
+type GLuint64 = number;
+type Uint32List = Uint32Array | GLuint[];
+type BufferSource = ArrayBufferView | ArrayBuffer;
+type DOMTimeStamp = number;
+type FormDataEntryValue = File | string;
+type IDBValidKey = number | string | Date | BufferSource | IDBArrayKey;
+type Transferable = ArrayBuffer | MessagePort | ImageBitmap | OffscreenCanvas;
+type BinaryType = "arraybuffer" | "blob";
+type CanvasDirection = "inherit" | "ltr" | "rtl";
+type CanvasFillRule = "evenodd" | "nonzero";
+type CanvasLineCap = "butt" | "round" | "square";
+type CanvasLineJoin = "bevel" | "miter" | "round";
+type CanvasTextAlign = "center" | "end" | "left" | "right" | "start";
+type CanvasTextBaseline = "alphabetic" | "bottom" | "hanging" | "ideographic" | "middle" | "top";
+type ClientTypes = "all" | "sharedworker" | "window" | "worker";
+type ColorSpaceConversion = "default" | "none";
+type EndingType = "native" | "transparent";
+type FrameType = "auxiliary" | "nested" | "none" | "top-level";
+type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique";
+type IDBRequestReadyState = "done" | "pending";
+type IDBTransactionMode = "readonly" | "readwrite" | "versionchange";
+type ImageOrientation = "flipY" | "none";
+type ImageSmoothingQuality = "high" | "low" | "medium";
+type KeyFormat = "jwk" | "pkcs8" | "raw" | "spki";
+type KeyType = "private" | "public" | "secret";
+type KeyUsage = "decrypt" | "deriveBits" | "deriveKey" | "encrypt" | "sign" | "unwrapKey" | "verify" | "wrapKey";
+type NotificationDirection = "auto" | "ltr" | "rtl";
+type NotificationPermission = "default" | "denied" | "granted";
+type OffscreenRenderingContextId = "2d" | "bitmaprenderer" | "webgl" | "webgl2";
+type PermissionName = "accelerometer" | "ambient-light-sensor" | "background-sync" | "bluetooth" | "camera" | "clipboard" | "device-info" | "geolocation" | "gyroscope" | "magnetometer" | "microphone" | "midi" | "notifications" | "persistent-storage" | "push" | "speaker";
+type PermissionState = "denied" | "granted" | "prompt";
+type PremultiplyAlpha = "default" | "none" | "premultiply";
+type PushEncryptionKeyName = "auth" | "p256dh";
+type PushPermissionState = "denied" | "granted" | "prompt";
+type ReferrerPolicy = "" | "no-referrer" | "no-referrer-when-downgrade" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url";
+type RequestCache = "default" | "force-cache" | "no-cache" | "no-store" | "only-if-cached" | "reload";
+type RequestCredentials = "include" | "omit" | "same-origin";
+type RequestDestination = "" | "audio" | "audioworklet" | "document" | "embed" | "font" | "image" | "manifest" | "object" | "paintworklet" | "report" | "script" | "sharedworker" | "style" | "track" | "video" | "worker" | "xslt";
+type RequestMode = "cors" | "navigate" | "no-cors" | "same-origin";
+type RequestRedirect = "error" | "follow" | "manual";
+type ResizeQuality = "high" | "low" | "medium" | "pixelated";
+type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect";
+type ServiceWorkerState = "activated" | "activating" | "installed" | "installing" | "parsed" | "redundant";
+type ServiceWorkerUpdateViaCache = "all" | "imports" | "none";
+type VisibilityState = "hidden" | "visible";
+type WebGLPowerPreference = "default" | "high-performance" | "low-power";
+type WorkerType = "classic" | "module";
+type XMLHttpRequestResponseType = "" | "arraybuffer" | "blob" | "document" | "json" | "text";
diff --git a/cli/dts/lib.webworker.importscripts.d.ts b/cli/dts/lib.webworker.importscripts.d.ts
new file mode 100644
index 000000000..73bd28166
--- /dev/null
+++ b/cli/dts/lib.webworker.importscripts.d.ts
@@ -0,0 +1,26 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+
+
+/// <reference no-default-lib="true"/>
+
+
+
+/////////////////////////////
+/// WorkerGlobalScope APIs
+/////////////////////////////
+// These are only available in a Web Worker
+declare function importScripts(...urls: string[]): void;
diff --git a/cli/dts/typescript.d.ts b/cli/dts/typescript.d.ts
new file mode 100644
index 000000000..62e8560ae
--- /dev/null
+++ b/cli/dts/typescript.d.ts
@@ -0,0 +1,6126 @@
+/*! *****************************************************************************
+Copyright (c) Microsoft Corporation. All rights reserved.
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at http://www.apache.org/licenses/LICENSE-2.0
+
+THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
+WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
+MERCHANTABLITY OR NON-INFRINGEMENT.
+
+See the Apache Version 2.0 License for specific language governing permissions
+and limitations under the License.
+***************************************************************************** */
+
+declare namespace ts {
+ const versionMajorMinor = "3.9";
+ /** The version of the TypeScript compiler release */
+ const version: string;
+ /**
+ * Type of objects whose values are all of the same type.
+ * The `in` and `for-in` operators can *not* be safely used,
+ * since `Object.prototype` may be modified by outside code.
+ */
+ interface MapLike<T> {
+ [index: string]: T;
+ }
+ interface SortedReadonlyArray<T> extends ReadonlyArray<T> {
+ " __sortedArrayBrand": any;
+ }
+ interface SortedArray<T> extends Array<T> {
+ " __sortedArrayBrand": any;
+ }
+ /** ES6 Map interface, only read methods included. */
+ interface ReadonlyMap<T> {
+ get(key: string): T | undefined;
+ has(key: string): boolean;
+ forEach(action: (value: T, key: string) => void): void;
+ readonly size: number;
+ keys(): Iterator<string>;
+ values(): Iterator<T>;
+ entries(): Iterator<[string, T]>;
+ }
+ /** ES6 Map interface. */
+ interface Map<T> extends ReadonlyMap<T> {
+ set(key: string, value: T): this;
+ delete(key: string): boolean;
+ clear(): void;
+ }
+ /** ES6 Iterator type. */
+ interface Iterator<T> {
+ next(): {
+ value: T;
+ done?: false;
+ } | {
+ value: never;
+ done: true;
+ };
+ }
+ /** Array that is only intended to be pushed to, never read. */
+ interface Push<T> {
+ push(...values: T[]): void;
+ }
+}
+declare namespace ts {
+ export type Path = string & {
+ __pathBrand: any;
+ };
+ export interface TextRange {
+ pos: number;
+ end: number;
+ }
+ export type JSDocSyntaxKind = SyntaxKind.EndOfFileToken | SyntaxKind.WhitespaceTrivia | SyntaxKind.AtToken | SyntaxKind.NewLineTrivia | SyntaxKind.AsteriskToken | SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.LessThanToken | SyntaxKind.GreaterThanToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.EqualsToken | SyntaxKind.CommaToken | SyntaxKind.DotToken | SyntaxKind.Identifier | SyntaxKind.BacktickToken | SyntaxKind.Unknown | KeywordSyntaxKind;
+ export type KeywordSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsKeyword | SyntaxKind.AssertsKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.ConstKeyword | SyntaxKind.ConstructorKeyword | SyntaxKind.DebuggerKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.EnumKeyword | SyntaxKind.ExportKeyword | SyntaxKind.ExtendsKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FinallyKeyword | SyntaxKind.ForKeyword | SyntaxKind.FromKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.GetKeyword | SyntaxKind.IfKeyword | SyntaxKind.ImplementsKeyword | SyntaxKind.ImportKeyword | SyntaxKind.InKeyword | SyntaxKind.InferKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.InterfaceKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.LetKeyword | SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.PackageKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.RequireKeyword | SyntaxKind.GlobalKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SetKeyword | SyntaxKind.StaticKeyword | SyntaxKind.StringKeyword | SyntaxKind.SuperKeyword | SyntaxKind.SwitchKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.ThrowKeyword | SyntaxKind.TrueKeyword | SyntaxKind.TryKeyword | SyntaxKind.TypeKeyword | SyntaxKind.TypeOfKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.YieldKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.OfKeyword;
+ export type JsxTokenSyntaxKind = SyntaxKind.LessThanSlashToken | SyntaxKind.EndOfFileToken | SyntaxKind.ConflictMarkerTrivia | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.OpenBraceToken | SyntaxKind.LessThanToken;
+ export enum SyntaxKind {
+ Unknown = 0,
+ EndOfFileToken = 1,
+ SingleLineCommentTrivia = 2,
+ MultiLineCommentTrivia = 3,
+ NewLineTrivia = 4,
+ WhitespaceTrivia = 5,
+ ShebangTrivia = 6,
+ ConflictMarkerTrivia = 7,
+ NumericLiteral = 8,
+ BigIntLiteral = 9,
+ StringLiteral = 10,
+ JsxText = 11,
+ JsxTextAllWhiteSpaces = 12,
+ RegularExpressionLiteral = 13,
+ NoSubstitutionTemplateLiteral = 14,
+ TemplateHead = 15,
+ TemplateMiddle = 16,
+ TemplateTail = 17,
+ OpenBraceToken = 18,
+ CloseBraceToken = 19,
+ OpenParenToken = 20,
+ CloseParenToken = 21,
+ OpenBracketToken = 22,
+ CloseBracketToken = 23,
+ DotToken = 24,
+ DotDotDotToken = 25,
+ SemicolonToken = 26,
+ CommaToken = 27,
+ QuestionDotToken = 28,
+ LessThanToken = 29,
+ LessThanSlashToken = 30,
+ GreaterThanToken = 31,
+ LessThanEqualsToken = 32,
+ GreaterThanEqualsToken = 33,
+ EqualsEqualsToken = 34,
+ ExclamationEqualsToken = 35,
+ EqualsEqualsEqualsToken = 36,
+ ExclamationEqualsEqualsToken = 37,
+ EqualsGreaterThanToken = 38,
+ PlusToken = 39,
+ MinusToken = 40,
+ AsteriskToken = 41,
+ AsteriskAsteriskToken = 42,
+ SlashToken = 43,
+ PercentToken = 44,
+ PlusPlusToken = 45,
+ MinusMinusToken = 46,
+ LessThanLessThanToken = 47,
+ GreaterThanGreaterThanToken = 48,
+ GreaterThanGreaterThanGreaterThanToken = 49,
+ AmpersandToken = 50,
+ BarToken = 51,
+ CaretToken = 52,
+ ExclamationToken = 53,
+ TildeToken = 54,
+ AmpersandAmpersandToken = 55,
+ BarBarToken = 56,
+ QuestionToken = 57,
+ ColonToken = 58,
+ AtToken = 59,
+ QuestionQuestionToken = 60,
+ /** Only the JSDoc scanner produces BacktickToken. The normal scanner produces NoSubstitutionTemplateLiteral and related kinds. */
+ BacktickToken = 61,
+ EqualsToken = 62,
+ PlusEqualsToken = 63,
+ MinusEqualsToken = 64,
+ AsteriskEqualsToken = 65,
+ AsteriskAsteriskEqualsToken = 66,
+ SlashEqualsToken = 67,
+ PercentEqualsToken = 68,
+ LessThanLessThanEqualsToken = 69,
+ GreaterThanGreaterThanEqualsToken = 70,
+ GreaterThanGreaterThanGreaterThanEqualsToken = 71,
+ AmpersandEqualsToken = 72,
+ BarEqualsToken = 73,
+ CaretEqualsToken = 74,
+ Identifier = 75,
+ PrivateIdentifier = 76,
+ BreakKeyword = 77,
+ CaseKeyword = 78,
+ CatchKeyword = 79,
+ ClassKeyword = 80,
+ ConstKeyword = 81,
+ ContinueKeyword = 82,
+ DebuggerKeyword = 83,
+ DefaultKeyword = 84,
+ DeleteKeyword = 85,
+ DoKeyword = 86,
+ ElseKeyword = 87,
+ EnumKeyword = 88,
+ ExportKeyword = 89,
+ ExtendsKeyword = 90,
+ FalseKeyword = 91,
+ FinallyKeyword = 92,
+ ForKeyword = 93,
+ FunctionKeyword = 94,
+ IfKeyword = 95,
+ ImportKeyword = 96,
+ InKeyword = 97,
+ InstanceOfKeyword = 98,
+ NewKeyword = 99,
+ NullKeyword = 100,
+ ReturnKeyword = 101,
+ SuperKeyword = 102,
+ SwitchKeyword = 103,
+ ThisKeyword = 104,
+ ThrowKeyword = 105,
+ TrueKeyword = 106,
+ TryKeyword = 107,
+ TypeOfKeyword = 108,
+ VarKeyword = 109,
+ VoidKeyword = 110,
+ WhileKeyword = 111,
+ WithKeyword = 112,
+ ImplementsKeyword = 113,
+ InterfaceKeyword = 114,
+ LetKeyword = 115,
+ PackageKeyword = 116,
+ PrivateKeyword = 117,
+ ProtectedKeyword = 118,
+ PublicKeyword = 119,
+ StaticKeyword = 120,
+ YieldKeyword = 121,
+ AbstractKeyword = 122,
+ AsKeyword = 123,
+ AssertsKeyword = 124,
+ AnyKeyword = 125,
+ AsyncKeyword = 126,
+ AwaitKeyword = 127,
+ BooleanKeyword = 128,
+ ConstructorKeyword = 129,
+ DeclareKeyword = 130,
+ GetKeyword = 131,
+ InferKeyword = 132,
+ IsKeyword = 133,
+ KeyOfKeyword = 134,
+ ModuleKeyword = 135,
+ NamespaceKeyword = 136,
+ NeverKeyword = 137,
+ ReadonlyKeyword = 138,
+ RequireKeyword = 139,
+ NumberKeyword = 140,
+ ObjectKeyword = 141,
+ SetKeyword = 142,
+ StringKeyword = 143,
+ SymbolKeyword = 144,
+ TypeKeyword = 145,
+ UndefinedKeyword = 146,
+ UniqueKeyword = 147,
+ UnknownKeyword = 148,
+ FromKeyword = 149,
+ GlobalKeyword = 150,
+ BigIntKeyword = 151,
+ OfKeyword = 152,
+ QualifiedName = 153,
+ ComputedPropertyName = 154,
+ TypeParameter = 155,
+ Parameter = 156,
+ Decorator = 157,
+ PropertySignature = 158,
+ PropertyDeclaration = 159,
+ MethodSignature = 160,
+ MethodDeclaration = 161,
+ Constructor = 162,
+ GetAccessor = 163,
+ SetAccessor = 164,
+ CallSignature = 165,
+ ConstructSignature = 166,
+ IndexSignature = 167,
+ TypePredicate = 168,
+ TypeReference = 169,
+ FunctionType = 170,
+ ConstructorType = 171,
+ TypeQuery = 172,
+ TypeLiteral = 173,
+ ArrayType = 174,
+ TupleType = 175,
+ OptionalType = 176,
+ RestType = 177,
+ UnionType = 178,
+ IntersectionType = 179,
+ ConditionalType = 180,
+ InferType = 181,
+ ParenthesizedType = 182,
+ ThisType = 183,
+ TypeOperator = 184,
+ IndexedAccessType = 185,
+ MappedType = 186,
+ LiteralType = 187,
+ ImportType = 188,
+ ObjectBindingPattern = 189,
+ ArrayBindingPattern = 190,
+ BindingElement = 191,
+ ArrayLiteralExpression = 192,
+ ObjectLiteralExpression = 193,
+ PropertyAccessExpression = 194,
+ ElementAccessExpression = 195,
+ CallExpression = 196,
+ NewExpression = 197,
+ TaggedTemplateExpression = 198,
+ TypeAssertionExpression = 199,
+ ParenthesizedExpression = 200,
+ FunctionExpression = 201,
+ ArrowFunction = 202,
+ DeleteExpression = 203,
+ TypeOfExpression = 204,
+ VoidExpression = 205,
+ AwaitExpression = 206,
+ PrefixUnaryExpression = 207,
+ PostfixUnaryExpression = 208,
+ BinaryExpression = 209,
+ ConditionalExpression = 210,
+ TemplateExpression = 211,
+ YieldExpression = 212,
+ SpreadElement = 213,
+ ClassExpression = 214,
+ OmittedExpression = 215,
+ ExpressionWithTypeArguments = 216,
+ AsExpression = 217,
+ NonNullExpression = 218,
+ MetaProperty = 219,
+ SyntheticExpression = 220,
+ TemplateSpan = 221,
+ SemicolonClassElement = 222,
+ Block = 223,
+ EmptyStatement = 224,
+ VariableStatement = 225,
+ ExpressionStatement = 226,
+ IfStatement = 227,
+ DoStatement = 228,
+ WhileStatement = 229,
+ ForStatement = 230,
+ ForInStatement = 231,
+ ForOfStatement = 232,
+ ContinueStatement = 233,
+ BreakStatement = 234,
+ ReturnStatement = 235,
+ WithStatement = 236,
+ SwitchStatement = 237,
+ LabeledStatement = 238,
+ ThrowStatement = 239,
+ TryStatement = 240,
+ DebuggerStatement = 241,
+ VariableDeclaration = 242,
+ VariableDeclarationList = 243,
+ FunctionDeclaration = 244,
+ ClassDeclaration = 245,
+ InterfaceDeclaration = 246,
+ TypeAliasDeclaration = 247,
+ EnumDeclaration = 248,
+ ModuleDeclaration = 249,
+ ModuleBlock = 250,
+ CaseBlock = 251,
+ NamespaceExportDeclaration = 252,
+ ImportEqualsDeclaration = 253,
+ ImportDeclaration = 254,
+ ImportClause = 255,
+ NamespaceImport = 256,
+ NamedImports = 257,
+ ImportSpecifier = 258,
+ ExportAssignment = 259,
+ ExportDeclaration = 260,
+ NamedExports = 261,
+ NamespaceExport = 262,
+ ExportSpecifier = 263,
+ MissingDeclaration = 264,
+ ExternalModuleReference = 265,
+ JsxElement = 266,
+ JsxSelfClosingElement = 267,
+ JsxOpeningElement = 268,
+ JsxClosingElement = 269,
+ JsxFragment = 270,
+ JsxOpeningFragment = 271,
+ JsxClosingFragment = 272,
+ JsxAttribute = 273,
+ JsxAttributes = 274,
+ JsxSpreadAttribute = 275,
+ JsxExpression = 276,
+ CaseClause = 277,
+ DefaultClause = 278,
+ HeritageClause = 279,
+ CatchClause = 280,
+ PropertyAssignment = 281,
+ ShorthandPropertyAssignment = 282,
+ SpreadAssignment = 283,
+ EnumMember = 284,
+ UnparsedPrologue = 285,
+ UnparsedPrepend = 286,
+ UnparsedText = 287,
+ UnparsedInternalText = 288,
+ UnparsedSyntheticReference = 289,
+ SourceFile = 290,
+ Bundle = 291,
+ UnparsedSource = 292,
+ InputFiles = 293,
+ JSDocTypeExpression = 294,
+ JSDocAllType = 295,
+ JSDocUnknownType = 296,
+ JSDocNullableType = 297,
+ JSDocNonNullableType = 298,
+ JSDocOptionalType = 299,
+ JSDocFunctionType = 300,
+ JSDocVariadicType = 301,
+ JSDocNamepathType = 302,
+ JSDocComment = 303,
+ JSDocTypeLiteral = 304,
+ JSDocSignature = 305,
+ JSDocTag = 306,
+ JSDocAugmentsTag = 307,
+ JSDocImplementsTag = 308,
+ JSDocAuthorTag = 309,
+ JSDocClassTag = 310,
+ JSDocPublicTag = 311,
+ JSDocPrivateTag = 312,
+ JSDocProtectedTag = 313,
+ JSDocReadonlyTag = 314,
+ JSDocCallbackTag = 315,
+ JSDocEnumTag = 316,
+ JSDocParameterTag = 317,
+ JSDocReturnTag = 318,
+ JSDocThisTag = 319,
+ JSDocTypeTag = 320,
+ JSDocTemplateTag = 321,
+ JSDocTypedefTag = 322,
+ JSDocPropertyTag = 323,
+ SyntaxList = 324,
+ NotEmittedStatement = 325,
+ PartiallyEmittedExpression = 326,
+ CommaListExpression = 327,
+ MergeDeclarationMarker = 328,
+ EndOfDeclarationMarker = 329,
+ SyntheticReferenceExpression = 330,
+ Count = 331,
+ FirstAssignment = 62,
+ LastAssignment = 74,
+ FirstCompoundAssignment = 63,
+ LastCompoundAssignment = 74,
+ FirstReservedWord = 77,
+ LastReservedWord = 112,
+ FirstKeyword = 77,
+ LastKeyword = 152,
+ FirstFutureReservedWord = 113,
+ LastFutureReservedWord = 121,
+ FirstTypeNode = 168,
+ LastTypeNode = 188,
+ FirstPunctuation = 18,
+ LastPunctuation = 74,
+ FirstToken = 0,
+ LastToken = 152,
+ FirstTriviaToken = 2,
+ LastTriviaToken = 7,
+ FirstLiteralToken = 8,
+ LastLiteralToken = 14,
+ FirstTemplateToken = 14,
+ LastTemplateToken = 17,
+ FirstBinaryOperator = 29,
+ LastBinaryOperator = 74,
+ FirstStatement = 225,
+ LastStatement = 241,
+ FirstNode = 153,
+ FirstJSDocNode = 294,
+ LastJSDocNode = 323,
+ FirstJSDocTagNode = 306,
+ LastJSDocTagNode = 323,
+ }
+ export enum NodeFlags {
+ None = 0,
+ Let = 1,
+ Const = 2,
+ NestedNamespace = 4,
+ Synthesized = 8,
+ Namespace = 16,
+ OptionalChain = 32,
+ ExportContext = 64,
+ ContainsThis = 128,
+ HasImplicitReturn = 256,
+ HasExplicitReturn = 512,
+ GlobalAugmentation = 1024,
+ HasAsyncFunctions = 2048,
+ DisallowInContext = 4096,
+ YieldContext = 8192,
+ DecoratorContext = 16384,
+ AwaitContext = 32768,
+ ThisNodeHasError = 65536,
+ JavaScriptFile = 131072,
+ ThisNodeOrAnySubNodesHasError = 262144,
+ HasAggregatedChildData = 524288,
+ JSDoc = 4194304,
+ JsonFile = 33554432,
+ BlockScoped = 3,
+ ReachabilityCheckFlags = 768,
+ ReachabilityAndEmitFlags = 2816,
+ ContextFlags = 25358336,
+ TypeExcludesFlags = 40960,
+ }
+ export enum ModifierFlags {
+ None = 0,
+ Export = 1,
+ Ambient = 2,
+ Public = 4,
+ Private = 8,
+ Protected = 16,
+ Static = 32,
+ Readonly = 64,
+ Abstract = 128,
+ Async = 256,
+ Default = 512,
+ Const = 2048,
+ HasComputedFlags = 536870912,
+ AccessibilityModifier = 28,
+ ParameterPropertyModifier = 92,
+ NonPublicAccessibilityModifier = 24,
+ TypeScriptModifier = 2270,
+ ExportDefault = 513,
+ All = 3071
+ }
+ export enum JsxFlags {
+ None = 0,
+ /** An element from a named property of the JSX.IntrinsicElements interface */
+ IntrinsicNamedElement = 1,
+ /** An element inferred from the string index signature of the JSX.IntrinsicElements interface */
+ IntrinsicIndexedElement = 2,
+ IntrinsicElement = 3
+ }
+ export interface Node extends TextRange {
+ kind: SyntaxKind;
+ flags: NodeFlags;
+ decorators?: NodeArray<Decorator>;
+ modifiers?: ModifiersArray;
+ parent: Node;
+ }
+ export interface JSDocContainer {
+ }
+ export type HasJSDoc = ParameterDeclaration | CallSignatureDeclaration | ConstructSignatureDeclaration | MethodSignature | PropertySignature | ArrowFunction | ParenthesizedExpression | SpreadAssignment | ShorthandPropertyAssignment | PropertyAssignment | FunctionExpression | LabeledStatement | ExpressionStatement | VariableStatement | FunctionDeclaration | ConstructorDeclaration | MethodDeclaration | PropertyDeclaration | AccessorDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumMember | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | ExportDeclaration | EndOfFileToken;
+ export type HasType = SignatureDeclaration | VariableDeclaration | ParameterDeclaration | PropertySignature | PropertyDeclaration | TypePredicateNode | ParenthesizedTypeNode | TypeOperatorNode | MappedTypeNode | AssertionExpression | TypeAliasDeclaration | JSDocTypeExpression | JSDocNonNullableType | JSDocNullableType | JSDocOptionalType | JSDocVariadicType;
+ export type HasTypeArguments = CallExpression | NewExpression | TaggedTemplateExpression | JsxOpeningElement | JsxSelfClosingElement;
+ export type HasInitializer = HasExpressionInitializer | ForStatement | ForInStatement | ForOfStatement | JsxAttribute;
+ export type HasExpressionInitializer = VariableDeclaration | ParameterDeclaration | BindingElement | PropertySignature | PropertyDeclaration | PropertyAssignment | EnumMember;
+ export interface NodeArray<T extends Node> extends ReadonlyArray<T>, TextRange {
+ hasTrailingComma?: boolean;
+ }
+ export interface Token<TKind extends SyntaxKind> extends Node {
+ kind: TKind;
+ }
+ export type DotToken = Token<SyntaxKind.DotToken>;
+ export type DotDotDotToken = Token<SyntaxKind.DotDotDotToken>;
+ export type QuestionToken = Token<SyntaxKind.QuestionToken>;
+ export type QuestionDotToken = Token<SyntaxKind.QuestionDotToken>;
+ export type ExclamationToken = Token<SyntaxKind.ExclamationToken>;
+ export type ColonToken = Token<SyntaxKind.ColonToken>;
+ export type EqualsToken = Token<SyntaxKind.EqualsToken>;
+ export type AsteriskToken = Token<SyntaxKind.AsteriskToken>;
+ export type EqualsGreaterThanToken = Token<SyntaxKind.EqualsGreaterThanToken>;
+ export type EndOfFileToken = Token<SyntaxKind.EndOfFileToken> & JSDocContainer;
+ export type ReadonlyToken = Token<SyntaxKind.ReadonlyKeyword>;
+ export type AwaitKeywordToken = Token<SyntaxKind.AwaitKeyword>;
+ export type PlusToken = Token<SyntaxKind.PlusToken>;
+ export type MinusToken = Token<SyntaxKind.MinusToken>;
+ export type AssertsToken = Token<SyntaxKind.AssertsKeyword>;
+ export type Modifier = Token<SyntaxKind.AbstractKeyword> | Token<SyntaxKind.AsyncKeyword> | Token<SyntaxKind.ConstKeyword> | Token<SyntaxKind.DeclareKeyword> | Token<SyntaxKind.DefaultKeyword> | Token<SyntaxKind.ExportKeyword> | Token<SyntaxKind.PublicKeyword> | Token<SyntaxKind.PrivateKeyword> | Token<SyntaxKind.ProtectedKeyword> | Token<SyntaxKind.ReadonlyKeyword> | Token<SyntaxKind.StaticKeyword>;
+ export type ModifiersArray = NodeArray<Modifier>;
+ export interface Identifier extends PrimaryExpression, Declaration {
+ kind: SyntaxKind.Identifier;
+ /**
+ * Prefer to use `id.unescapedText`. (Note: This is available only in services, not internally to the TypeScript compiler.)
+ * Text of identifier, but if the identifier begins with two underscores, this will begin with three.
+ */
+ escapedText: __String;
+ originalKeywordKind?: SyntaxKind;
+ isInJSDocNamespace?: boolean;
+ }
+ export interface TransientIdentifier extends Identifier {
+ resolvedSymbol: Symbol;
+ }
+ export interface QualifiedName extends Node {
+ kind: SyntaxKind.QualifiedName;
+ left: EntityName;
+ right: Identifier;
+ }
+ export type EntityName = Identifier | QualifiedName;
+ export type PropertyName = Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier;
+ export type DeclarationName = Identifier | PrivateIdentifier | StringLiteralLike | NumericLiteral | ComputedPropertyName | ElementAccessExpression | BindingPattern | EntityNameExpression;
+ export interface Declaration extends Node {
+ _declarationBrand: any;
+ }
+ export interface NamedDeclaration extends Declaration {
+ name?: DeclarationName;
+ }
+ export interface DeclarationStatement extends NamedDeclaration, Statement {
+ name?: Identifier | StringLiteral | NumericLiteral;
+ }
+ export interface ComputedPropertyName extends Node {
+ parent: Declaration;
+ kind: SyntaxKind.ComputedPropertyName;
+ expression: Expression;
+ }
+ export interface PrivateIdentifier extends Node {
+ kind: SyntaxKind.PrivateIdentifier;
+ escapedText: __String;
+ }
+ export interface Decorator extends Node {
+ kind: SyntaxKind.Decorator;
+ parent: NamedDeclaration;
+ expression: LeftHandSideExpression;
+ }
+ export interface TypeParameterDeclaration extends NamedDeclaration {
+ kind: SyntaxKind.TypeParameter;
+ parent: DeclarationWithTypeParameterChildren | InferTypeNode;
+ name: Identifier;
+ /** Note: Consider calling `getEffectiveConstraintOfTypeParameter` */
+ constraint?: TypeNode;
+ default?: TypeNode;
+ expression?: Expression;
+ }
+ export interface SignatureDeclarationBase extends NamedDeclaration, JSDocContainer {
+ kind: SignatureDeclaration["kind"];
+ name?: PropertyName;
+ typeParameters?: NodeArray<TypeParameterDeclaration>;
+ parameters: NodeArray<ParameterDeclaration>;
+ type?: TypeNode;
+ }
+ export type SignatureDeclaration = CallSignatureDeclaration | ConstructSignatureDeclaration | MethodSignature | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | FunctionDeclaration | MethodDeclaration | ConstructorDeclaration | AccessorDeclaration | FunctionExpression | ArrowFunction;
+ export interface CallSignatureDeclaration extends SignatureDeclarationBase, TypeElement {
+ kind: SyntaxKind.CallSignature;
+ }
+ export interface ConstructSignatureDeclaration extends SignatureDeclarationBase, TypeElement {
+ kind: SyntaxKind.ConstructSignature;
+ }
+ export type BindingName = Identifier | BindingPattern;
+ export interface VariableDeclaration extends NamedDeclaration {
+ kind: SyntaxKind.VariableDeclaration;
+ parent: VariableDeclarationList | CatchClause;
+ name: BindingName;
+ exclamationToken?: ExclamationToken;
+ type?: TypeNode;
+ initializer?: Expression;
+ }
+ export interface VariableDeclarationList extends Node {
+ kind: SyntaxKind.VariableDeclarationList;
+ parent: VariableStatement | ForStatement | ForOfStatement | ForInStatement;
+ declarations: NodeArray<VariableDeclaration>;
+ }
+ export interface ParameterDeclaration extends NamedDeclaration, JSDocContainer {
+ kind: SyntaxKind.Parameter;
+ parent: SignatureDeclaration;
+ dotDotDotToken?: DotDotDotToken;
+ name: BindingName;
+ questionToken?: QuestionToken;
+ type?: TypeNode;
+ initializer?: Expression;
+ }
+ export interface BindingElement extends NamedDeclaration {
+ kind: SyntaxKind.BindingElement;
+ parent: BindingPattern;
+ propertyName?: PropertyName;
+ dotDotDotToken?: DotDotDotToken;
+ name: BindingName;
+ initializer?: Expression;
+ }
+ export interface PropertySignature extends TypeElement, JSDocContainer {
+ kind: SyntaxKind.PropertySignature;
+ name: PropertyName;
+ questionToken?: QuestionToken;
+ type?: TypeNode;
+ initializer?: Expression;
+ }
+ export interface PropertyDeclaration extends ClassElement, JSDocContainer {
+ kind: SyntaxKind.PropertyDeclaration;
+ parent: ClassLikeDeclaration;
+ name: PropertyName;
+ questionToken?: QuestionToken;
+ exclamationToken?: ExclamationToken;
+ type?: TypeNode;
+ initializer?: Expression;
+ }
+ export interface ObjectLiteralElement extends NamedDeclaration {
+ _objectLiteralBrand: any;
+ name?: PropertyName;
+ }
+ /** Unlike ObjectLiteralElement, excludes JSXAttribute and JSXSpreadAttribute. */
+ export type ObjectLiteralElementLike = PropertyAssignment | ShorthandPropertyAssignment | SpreadAssignment | MethodDeclaration | AccessorDeclaration;
+ export interface PropertyAssignment extends ObjectLiteralElement, JSDocContainer {
+ parent: ObjectLiteralExpression;
+ kind: SyntaxKind.PropertyAssignment;
+ name: PropertyName;
+ questionToken?: QuestionToken;
+ initializer: Expression;
+ }
+ export interface ShorthandPropertyAssignment extends ObjectLiteralElement, JSDocContainer {
+ parent: ObjectLiteralExpression;
+ kind: SyntaxKind.ShorthandPropertyAssignment;
+ name: Identifier;
+ questionToken?: QuestionToken;
+ exclamationToken?: ExclamationToken;
+ equalsToken?: Token<SyntaxKind.EqualsToken>;
+ objectAssignmentInitializer?: Expression;
+ }
+ export interface SpreadAssignment extends ObjectLiteralElement, JSDocContainer {
+ parent: ObjectLiteralExpression;
+ kind: SyntaxKind.SpreadAssignment;
+ expression: Expression;
+ }
+ export type VariableLikeDeclaration = VariableDeclaration | ParameterDeclaration | BindingElement | PropertyDeclaration | PropertyAssignment | PropertySignature | JsxAttribute | ShorthandPropertyAssignment | EnumMember | JSDocPropertyTag | JSDocParameterTag;
+ export interface PropertyLikeDeclaration extends NamedDeclaration {
+ name: PropertyName;
+ }
+ export interface ObjectBindingPattern extends Node {
+ kind: SyntaxKind.ObjectBindingPattern;
+ parent: VariableDeclaration | ParameterDeclaration | BindingElement;
+ elements: NodeArray<BindingElement>;
+ }
+ export interface ArrayBindingPattern extends Node {
+ kind: SyntaxKind.ArrayBindingPattern;
+ parent: VariableDeclaration | ParameterDeclaration | BindingElement;
+ elements: NodeArray<ArrayBindingElement>;
+ }
+ export type BindingPattern = ObjectBindingPattern | ArrayBindingPattern;
+ export type ArrayBindingElement = BindingElement | OmittedExpression;
+ /**
+ * Several node kinds share function-like features such as a signature,
+ * a name, and a body. These nodes should extend FunctionLikeDeclarationBase.
+ * Examples:
+ * - FunctionDeclaration
+ * - MethodDeclaration
+ * - AccessorDeclaration
+ */
+ export interface FunctionLikeDeclarationBase extends SignatureDeclarationBase {
+ _functionLikeDeclarationBrand: any;
+ asteriskToken?: AsteriskToken;
+ questionToken?: QuestionToken;
+ exclamationToken?: ExclamationToken;
+ body?: Block | Expression;
+ }
+ export type FunctionLikeDeclaration = FunctionDeclaration | MethodDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | ConstructorDeclaration | FunctionExpression | ArrowFunction;
+ /** @deprecated Use SignatureDeclaration */
+ export type FunctionLike = SignatureDeclaration;
+ export interface FunctionDeclaration extends FunctionLikeDeclarationBase, DeclarationStatement {
+ kind: SyntaxKind.FunctionDeclaration;
+ name?: Identifier;
+ body?: FunctionBody;
+ }
+ export interface MethodSignature extends SignatureDeclarationBase, TypeElement {
+ kind: SyntaxKind.MethodSignature;
+ parent: ObjectTypeDeclaration;
+ name: PropertyName;
+ }
+ export interface MethodDeclaration extends FunctionLikeDeclarationBase, ClassElement, ObjectLiteralElement, JSDocContainer {
+ kind: SyntaxKind.MethodDeclaration;
+ parent: ClassLikeDeclaration | ObjectLiteralExpression;
+ name: PropertyName;
+ body?: FunctionBody;
+ }
+ export interface ConstructorDeclaration extends FunctionLikeDeclarationBase, ClassElement, JSDocContainer {
+ kind: SyntaxKind.Constructor;
+ parent: ClassLikeDeclaration;
+ body?: FunctionBody;
+ }
+ /** For when we encounter a semicolon in a class declaration. ES6 allows these as class elements. */
+ export interface SemicolonClassElement extends ClassElement {
+ kind: SyntaxKind.SemicolonClassElement;
+ parent: ClassLikeDeclaration;
+ }
+ export interface GetAccessorDeclaration extends FunctionLikeDeclarationBase, ClassElement, ObjectLiteralElement, JSDocContainer {
+ kind: SyntaxKind.GetAccessor;
+ parent: ClassLikeDeclaration | ObjectLiteralExpression;
+ name: PropertyName;
+ body?: FunctionBody;
+ }
+ export interface SetAccessorDeclaration extends FunctionLikeDeclarationBase, ClassElement, ObjectLiteralElement, JSDocContainer {
+ kind: SyntaxKind.SetAccessor;
+ parent: ClassLikeDeclaration | ObjectLiteralExpression;
+ name: PropertyName;
+ body?: FunctionBody;
+ }
+ export type AccessorDeclaration = GetAccessorDeclaration | SetAccessorDeclaration;
+ export interface IndexSignatureDeclaration extends SignatureDeclarationBase, ClassElement, TypeElement {
+ kind: SyntaxKind.IndexSignature;
+ parent: ObjectTypeDeclaration;
+ }
+ export interface TypeNode extends Node {
+ _typeNodeBrand: any;
+ }
+ export interface KeywordTypeNode extends TypeNode {
+ kind: SyntaxKind.AnyKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.NumberKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.VoidKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.NullKeyword | SyntaxKind.NeverKeyword;
+ }
+ export interface ImportTypeNode extends NodeWithTypeArguments {
+ kind: SyntaxKind.ImportType;
+ isTypeOf?: boolean;
+ argument: TypeNode;
+ qualifier?: EntityName;
+ }
+ export interface ThisTypeNode extends TypeNode {
+ kind: SyntaxKind.ThisType;
+ }
+ export type FunctionOrConstructorTypeNode = FunctionTypeNode | ConstructorTypeNode;
+ export interface FunctionOrConstructorTypeNodeBase extends TypeNode, SignatureDeclarationBase {
+ kind: SyntaxKind.FunctionType | SyntaxKind.ConstructorType;
+ type: TypeNode;
+ }
+ export interface FunctionTypeNode extends FunctionOrConstructorTypeNodeBase {
+ kind: SyntaxKind.FunctionType;
+ }
+ export interface ConstructorTypeNode extends FunctionOrConstructorTypeNodeBase {
+ kind: SyntaxKind.ConstructorType;
+ }
+ export interface NodeWithTypeArguments extends TypeNode {
+ typeArguments?: NodeArray<TypeNode>;
+ }
+ export type TypeReferenceType = TypeReferenceNode | ExpressionWithTypeArguments;
+ export interface TypeReferenceNode extends NodeWithTypeArguments {
+ kind: SyntaxKind.TypeReference;
+ typeName: EntityName;
+ }
+ export interface TypePredicateNode extends TypeNode {
+ kind: SyntaxKind.TypePredicate;
+ parent: SignatureDeclaration | JSDocTypeExpression;
+ assertsModifier?: AssertsToken;
+ parameterName: Identifier | ThisTypeNode;
+ type?: TypeNode;
+ }
+ export interface TypeQueryNode extends TypeNode {
+ kind: SyntaxKind.TypeQuery;
+ exprName: EntityName;
+ }
+ export interface TypeLiteralNode extends TypeNode, Declaration {
+ kind: SyntaxKind.TypeLiteral;
+ members: NodeArray<TypeElement>;
+ }
+ export interface ArrayTypeNode extends TypeNode {
+ kind: SyntaxKind.ArrayType;
+ elementType: TypeNode;
+ }
+ export interface TupleTypeNode extends TypeNode {
+ kind: SyntaxKind.TupleType;
+ elementTypes: NodeArray<TypeNode>;
+ }
+ export interface OptionalTypeNode extends TypeNode {
+ kind: SyntaxKind.OptionalType;
+ type: TypeNode;
+ }
+ export interface RestTypeNode extends TypeNode {
+ kind: SyntaxKind.RestType;
+ type: TypeNode;
+ }
+ export type UnionOrIntersectionTypeNode = UnionTypeNode | IntersectionTypeNode;
+ export interface UnionTypeNode extends TypeNode {
+ kind: SyntaxKind.UnionType;
+ types: NodeArray<TypeNode>;
+ }
+ export interface IntersectionTypeNode extends TypeNode {
+ kind: SyntaxKind.IntersectionType;
+ types: NodeArray<TypeNode>;
+ }
+ export interface ConditionalTypeNode extends TypeNode {
+ kind: SyntaxKind.ConditionalType;
+ checkType: TypeNode;
+ extendsType: TypeNode;
+ trueType: TypeNode;
+ falseType: TypeNode;
+ }
+ export interface InferTypeNode extends TypeNode {
+ kind: SyntaxKind.InferType;
+ typeParameter: TypeParameterDeclaration;
+ }
+ export interface ParenthesizedTypeNode extends TypeNode {
+ kind: SyntaxKind.ParenthesizedType;
+ type: TypeNode;
+ }
+ export interface TypeOperatorNode extends TypeNode {
+ kind: SyntaxKind.TypeOperator;
+ operator: SyntaxKind.KeyOfKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.ReadonlyKeyword;
+ type: TypeNode;
+ }
+ export interface IndexedAccessTypeNode extends TypeNode {
+ kind: SyntaxKind.IndexedAccessType;
+ objectType: TypeNode;
+ indexType: TypeNode;
+ }
+ export interface MappedTypeNode extends TypeNode, Declaration {
+ kind: SyntaxKind.MappedType;
+ readonlyToken?: ReadonlyToken | PlusToken | MinusToken;
+ typeParameter: TypeParameterDeclaration;
+ questionToken?: QuestionToken | PlusToken | MinusToken;
+ type?: TypeNode;
+ }
+ export interface LiteralTypeNode extends TypeNode {
+ kind: SyntaxKind.LiteralType;
+ literal: BooleanLiteral | LiteralExpression | PrefixUnaryExpression;
+ }
+ export interface StringLiteral extends LiteralExpression, Declaration {
+ kind: SyntaxKind.StringLiteral;
+ }
+ export type StringLiteralLike = StringLiteral | NoSubstitutionTemplateLiteral;
+ export interface Expression extends Node {
+ _expressionBrand: any;
+ }
+ export interface OmittedExpression extends Expression {
+ kind: SyntaxKind.OmittedExpression;
+ }
+ export interface PartiallyEmittedExpression extends LeftHandSideExpression {
+ kind: SyntaxKind.PartiallyEmittedExpression;
+ expression: Expression;
+ }
+ export interface UnaryExpression extends Expression {
+ _unaryExpressionBrand: any;
+ }
+ /** Deprecated, please use UpdateExpression */
+ export type IncrementExpression = UpdateExpression;
+ export interface UpdateExpression extends UnaryExpression {
+ _updateExpressionBrand: any;
+ }
+ export type PrefixUnaryOperator = SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.TildeToken | SyntaxKind.ExclamationToken;
+ export interface PrefixUnaryExpression extends UpdateExpression {
+ kind: SyntaxKind.PrefixUnaryExpression;
+ operator: PrefixUnaryOperator;
+ operand: UnaryExpression;
+ }
+ export type PostfixUnaryOperator = SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken;
+ export interface PostfixUnaryExpression extends UpdateExpression {
+ kind: SyntaxKind.PostfixUnaryExpression;
+ operand: LeftHandSideExpression;
+ operator: PostfixUnaryOperator;
+ }
+ export interface LeftHandSideExpression extends UpdateExpression {
+ _leftHandSideExpressionBrand: any;
+ }
+ export interface MemberExpression extends LeftHandSideExpression {
+ _memberExpressionBrand: any;
+ }
+ export interface PrimaryExpression extends MemberExpression {
+ _primaryExpressionBrand: any;
+ }
+ export interface NullLiteral extends PrimaryExpression, TypeNode {
+ kind: SyntaxKind.NullKeyword;
+ }
+ export interface BooleanLiteral extends PrimaryExpression, TypeNode {
+ kind: SyntaxKind.TrueKeyword | SyntaxKind.FalseKeyword;
+ }
+ export interface ThisExpression extends PrimaryExpression, KeywordTypeNode {
+ kind: SyntaxKind.ThisKeyword;
+ }
+ export interface SuperExpression extends PrimaryExpression {
+ kind: SyntaxKind.SuperKeyword;
+ }
+ export interface ImportExpression extends PrimaryExpression {
+ kind: SyntaxKind.ImportKeyword;
+ }
+ export interface DeleteExpression extends UnaryExpression {
+ kind: SyntaxKind.DeleteExpression;
+ expression: UnaryExpression;
+ }
+ export interface TypeOfExpression extends UnaryExpression {
+ kind: SyntaxKind.TypeOfExpression;
+ expression: UnaryExpression;
+ }
+ export interface VoidExpression extends UnaryExpression {
+ kind: SyntaxKind.VoidExpression;
+ expression: UnaryExpression;
+ }
+ export interface AwaitExpression extends UnaryExpression {
+ kind: SyntaxKind.AwaitExpression;
+ expression: UnaryExpression;
+ }
+ export interface YieldExpression extends Expression {
+ kind: SyntaxKind.YieldExpression;
+ asteriskToken?: AsteriskToken;
+ expression?: Expression;
+ }
+ export interface SyntheticExpression extends Expression {
+ kind: SyntaxKind.SyntheticExpression;
+ isSpread: boolean;
+ type: Type;
+ }
+ export type ExponentiationOperator = SyntaxKind.AsteriskAsteriskToken;
+ export type MultiplicativeOperator = SyntaxKind.AsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken;
+ export type MultiplicativeOperatorOrHigher = ExponentiationOperator | MultiplicativeOperator;
+ export type AdditiveOperator = SyntaxKind.PlusToken | SyntaxKind.MinusToken;
+ export type AdditiveOperatorOrHigher = MultiplicativeOperatorOrHigher | AdditiveOperator;
+ export type ShiftOperator = SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken;
+ export type ShiftOperatorOrHigher = AdditiveOperatorOrHigher | ShiftOperator;
+ export type RelationalOperator = SyntaxKind.LessThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.InstanceOfKeyword | SyntaxKind.InKeyword;
+ export type RelationalOperatorOrHigher = ShiftOperatorOrHigher | RelationalOperator;
+ export type EqualityOperator = SyntaxKind.EqualsEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.ExclamationEqualsToken;
+ export type EqualityOperatorOrHigher = RelationalOperatorOrHigher | EqualityOperator;
+ export type BitwiseOperator = SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken;
+ export type BitwiseOperatorOrHigher = EqualityOperatorOrHigher | BitwiseOperator;
+ export type LogicalOperator = SyntaxKind.AmpersandAmpersandToken | SyntaxKind.BarBarToken;
+ export type LogicalOperatorOrHigher = BitwiseOperatorOrHigher | LogicalOperator;
+ export type CompoundAssignmentOperator = SyntaxKind.PlusEqualsToken | SyntaxKind.MinusEqualsToken | SyntaxKind.AsteriskAsteriskEqualsToken | SyntaxKind.AsteriskEqualsToken | SyntaxKind.SlashEqualsToken | SyntaxKind.PercentEqualsToken | SyntaxKind.AmpersandEqualsToken | SyntaxKind.BarEqualsToken | SyntaxKind.CaretEqualsToken | SyntaxKind.LessThanLessThanEqualsToken | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken | SyntaxKind.GreaterThanGreaterThanEqualsToken;
+ export type AssignmentOperator = SyntaxKind.EqualsToken | CompoundAssignmentOperator;
+ export type AssignmentOperatorOrHigher = SyntaxKind.QuestionQuestionToken | LogicalOperatorOrHigher | AssignmentOperator;
+ export type BinaryOperator = AssignmentOperatorOrHigher | SyntaxKind.CommaToken;
+ export type BinaryOperatorToken = Token<BinaryOperator>;
+ export interface BinaryExpression extends Expression, Declaration {
+ kind: SyntaxKind.BinaryExpression;
+ left: Expression;
+ operatorToken: BinaryOperatorToken;
+ right: Expression;
+ }
+ export type AssignmentOperatorToken = Token<AssignmentOperator>;
+ export interface AssignmentExpression<TOperator extends AssignmentOperatorToken> extends BinaryExpression {
+ left: LeftHandSideExpression;
+ operatorToken: TOperator;
+ }
+ export interface ObjectDestructuringAssignment extends AssignmentExpression<EqualsToken> {
+ left: ObjectLiteralExpression;
+ }
+ export interface ArrayDestructuringAssignment extends AssignmentExpression<EqualsToken> {
+ left: ArrayLiteralExpression;
+ }
+ export type DestructuringAssignment = ObjectDestructuringAssignment | ArrayDestructuringAssignment;
+ export type BindingOrAssignmentElement = VariableDeclaration | ParameterDeclaration | BindingElement | PropertyAssignment | ShorthandPropertyAssignment | SpreadAssignment | OmittedExpression | SpreadElement | ArrayLiteralExpression | ObjectLiteralExpression | AssignmentExpression<EqualsToken> | Identifier | PropertyAccessExpression | ElementAccessExpression;
+ export type BindingOrAssignmentElementRestIndicator = DotDotDotToken | SpreadElement | SpreadAssignment;
+ export type BindingOrAssignmentElementTarget = BindingOrAssignmentPattern | Identifier | PropertyAccessExpression | ElementAccessExpression | OmittedExpression;
+ export type ObjectBindingOrAssignmentPattern = ObjectBindingPattern | ObjectLiteralExpression;
+ export type ArrayBindingOrAssignmentPattern = ArrayBindingPattern | ArrayLiteralExpression;
+ export type AssignmentPattern = ObjectLiteralExpression | ArrayLiteralExpression;
+ export type BindingOrAssignmentPattern = ObjectBindingOrAssignmentPattern | ArrayBindingOrAssignmentPattern;
+ export interface ConditionalExpression extends Expression {
+ kind: SyntaxKind.ConditionalExpression;
+ condition: Expression;
+ questionToken: QuestionToken;
+ whenTrue: Expression;
+ colonToken: ColonToken;
+ whenFalse: Expression;
+ }
+ export type FunctionBody = Block;
+ export type ConciseBody = FunctionBody | Expression;
+ export interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclarationBase, JSDocContainer {
+ kind: SyntaxKind.FunctionExpression;
+ name?: Identifier;
+ body: FunctionBody;
+ }
+ export interface ArrowFunction extends Expression, FunctionLikeDeclarationBase, JSDocContainer {
+ kind: SyntaxKind.ArrowFunction;
+ equalsGreaterThanToken: EqualsGreaterThanToken;
+ body: ConciseBody;
+ name: never;
+ }
+ export interface LiteralLikeNode extends Node {
+ text: string;
+ isUnterminated?: boolean;
+ hasExtendedUnicodeEscape?: boolean;
+ }
+ export interface TemplateLiteralLikeNode extends LiteralLikeNode {
+ rawText?: string;
+ }
+ export interface LiteralExpression extends LiteralLikeNode, PrimaryExpression {
+ _literalExpressionBrand: any;
+ }
+ export interface RegularExpressionLiteral extends LiteralExpression {
+ kind: SyntaxKind.RegularExpressionLiteral;
+ }
+ export interface NoSubstitutionTemplateLiteral extends LiteralExpression, TemplateLiteralLikeNode, Declaration {
+ kind: SyntaxKind.NoSubstitutionTemplateLiteral;
+ }
+ export enum TokenFlags {
+ None = 0,
+ Scientific = 16,
+ Octal = 32,
+ HexSpecifier = 64,
+ BinarySpecifier = 128,
+ OctalSpecifier = 256,
+ }
+ export interface NumericLiteral extends LiteralExpression, Declaration {
+ kind: SyntaxKind.NumericLiteral;
+ }
+ export interface BigIntLiteral extends LiteralExpression {
+ kind: SyntaxKind.BigIntLiteral;
+ }
+ export interface TemplateHead extends TemplateLiteralLikeNode {
+ kind: SyntaxKind.TemplateHead;
+ parent: TemplateExpression;
+ }
+ export interface TemplateMiddle extends TemplateLiteralLikeNode {
+ kind: SyntaxKind.TemplateMiddle;
+ parent: TemplateSpan;
+ }
+ export interface TemplateTail extends TemplateLiteralLikeNode {
+ kind: SyntaxKind.TemplateTail;
+ parent: TemplateSpan;
+ }
+ export type TemplateLiteral = TemplateExpression | NoSubstitutionTemplateLiteral;
+ export interface TemplateExpression extends PrimaryExpression {
+ kind: SyntaxKind.TemplateExpression;
+ head: TemplateHead;
+ templateSpans: NodeArray<TemplateSpan>;
+ }
+ export interface TemplateSpan extends Node {
+ kind: SyntaxKind.TemplateSpan;
+ parent: TemplateExpression;
+ expression: Expression;
+ literal: TemplateMiddle | TemplateTail;
+ }
+ export interface ParenthesizedExpression extends PrimaryExpression, JSDocContainer {
+ kind: SyntaxKind.ParenthesizedExpression;
+ expression: Expression;
+ }
+ export interface ArrayLiteralExpression extends PrimaryExpression {
+ kind: SyntaxKind.ArrayLiteralExpression;
+ elements: NodeArray<Expression>;
+ }
+ export interface SpreadElement extends Expression {
+ kind: SyntaxKind.SpreadElement;
+ parent: ArrayLiteralExpression | CallExpression | NewExpression;
+ expression: Expression;
+ }
+ /**
+ * This interface is a base interface for ObjectLiteralExpression and JSXAttributes to extend from. JSXAttributes is similar to
+ * ObjectLiteralExpression in that it contains array of properties; however, JSXAttributes' properties can only be
+ * JSXAttribute or JSXSpreadAttribute. ObjectLiteralExpression, on the other hand, can only have properties of type
+ * ObjectLiteralElement (e.g. PropertyAssignment, ShorthandPropertyAssignment etc.)
+ */
+ export interface ObjectLiteralExpressionBase<T extends ObjectLiteralElement> extends PrimaryExpression, Declaration {
+ properties: NodeArray<T>;
+ }
+ export interface ObjectLiteralExpression extends ObjectLiteralExpressionBase<ObjectLiteralElementLike> {
+ kind: SyntaxKind.ObjectLiteralExpression;
+ }
+ export type EntityNameExpression = Identifier | PropertyAccessEntityNameExpression;
+ export type EntityNameOrEntityNameExpression = EntityName | EntityNameExpression;
+ export interface PropertyAccessExpression extends MemberExpression, NamedDeclaration {
+ kind: SyntaxKind.PropertyAccessExpression;
+ expression: LeftHandSideExpression;
+ questionDotToken?: QuestionDotToken;
+ name: Identifier | PrivateIdentifier;
+ }
+ export interface PropertyAccessChain extends PropertyAccessExpression {
+ _optionalChainBrand: any;
+ name: Identifier;
+ }
+ export interface SuperPropertyAccessExpression extends PropertyAccessExpression {
+ expression: SuperExpression;
+ }
+ /** Brand for a PropertyAccessExpression which, like a QualifiedName, consists of a sequence of identifiers separated by dots. */
+ export interface PropertyAccessEntityNameExpression extends PropertyAccessExpression {
+ _propertyAccessExpressionLikeQualifiedNameBrand?: any;
+ expression: EntityNameExpression;
+ name: Identifier;
+ }
+ export interface ElementAccessExpression extends MemberExpression {
+ kind: SyntaxKind.ElementAccessExpression;
+ expression: LeftHandSideExpression;
+ questionDotToken?: QuestionDotToken;
+ argumentExpression: Expression;
+ }
+ export interface ElementAccessChain extends ElementAccessExpression {
+ _optionalChainBrand: any;
+ }
+ export interface SuperElementAccessExpression extends ElementAccessExpression {
+ expression: SuperExpression;
+ }
+ export type SuperProperty = SuperPropertyAccessExpression | SuperElementAccessExpression;
+ export interface CallExpression extends LeftHandSideExpression, Declaration {
+ kind: SyntaxKind.CallExpression;
+ expression: LeftHandSideExpression;
+ questionDotToken?: QuestionDotToken;
+ typeArguments?: NodeArray<TypeNode>;
+ arguments: NodeArray<Expression>;
+ }
+ export interface CallChain extends CallExpression {
+ _optionalChainBrand: any;
+ }
+ export type OptionalChain = PropertyAccessChain | ElementAccessChain | CallChain | NonNullChain;
+ export interface SuperCall extends CallExpression {
+ expression: SuperExpression;
+ }
+ export interface ImportCall extends CallExpression {
+ expression: ImportExpression;
+ }
+ export interface ExpressionWithTypeArguments extends NodeWithTypeArguments {
+ kind: SyntaxKind.ExpressionWithTypeArguments;
+ parent: HeritageClause | JSDocAugmentsTag | JSDocImplementsTag;
+ expression: LeftHandSideExpression;
+ }
+ export interface NewExpression extends PrimaryExpression, Declaration {
+ kind: SyntaxKind.NewExpression;
+ expression: LeftHandSideExpression;
+ typeArguments?: NodeArray<TypeNode>;
+ arguments?: NodeArray<Expression>;
+ }
+ export interface TaggedTemplateExpression extends MemberExpression {
+ kind: SyntaxKind.TaggedTemplateExpression;
+ tag: LeftHandSideExpression;
+ typeArguments?: NodeArray<TypeNode>;
+ template: TemplateLiteral;
+ }
+ export type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression | Decorator | JsxOpeningLikeElement;
+ export interface AsExpression extends Expression {
+ kind: SyntaxKind.AsExpression;
+ expression: Expression;
+ type: TypeNode;
+ }
+ export interface TypeAssertion extends UnaryExpression {
+ kind: SyntaxKind.TypeAssertionExpression;
+ type: TypeNode;
+ expression: UnaryExpression;
+ }
+ export type AssertionExpression = TypeAssertion | AsExpression;
+ export interface NonNullExpression extends LeftHandSideExpression {
+ kind: SyntaxKind.NonNullExpression;
+ expression: Expression;
+ }
+ export interface NonNullChain extends NonNullExpression {
+ _optionalChainBrand: any;
+ }
+ export interface MetaProperty extends PrimaryExpression {
+ kind: SyntaxKind.MetaProperty;
+ keywordToken: SyntaxKind.NewKeyword | SyntaxKind.ImportKeyword;
+ name: Identifier;
+ }
+ export interface JsxElement extends PrimaryExpression {
+ kind: SyntaxKind.JsxElement;
+ openingElement: JsxOpeningElement;
+ children: NodeArray<JsxChild>;
+ closingElement: JsxClosingElement;
+ }
+ export type JsxOpeningLikeElement = JsxSelfClosingElement | JsxOpeningElement;
+ export type JsxAttributeLike = JsxAttribute | JsxSpreadAttribute;
+ export type JsxTagNameExpression = Identifier | ThisExpression | JsxTagNamePropertyAccess;
+ export interface JsxTagNamePropertyAccess extends PropertyAccessExpression {
+ expression: JsxTagNameExpression;
+ }
+ export interface JsxAttributes extends ObjectLiteralExpressionBase<JsxAttributeLike> {
+ kind: SyntaxKind.JsxAttributes;
+ parent: JsxOpeningLikeElement;
+ }
+ export interface JsxOpeningElement extends Expression {
+ kind: SyntaxKind.JsxOpeningElement;
+ parent: JsxElement;
+ tagName: JsxTagNameExpression;
+ typeArguments?: NodeArray<TypeNode>;
+ attributes: JsxAttributes;
+ }
+ export interface JsxSelfClosingElement extends PrimaryExpression {
+ kind: SyntaxKind.JsxSelfClosingElement;
+ tagName: JsxTagNameExpression;
+ typeArguments?: NodeArray<TypeNode>;
+ attributes: JsxAttributes;
+ }
+ export interface JsxFragment extends PrimaryExpression {
+ kind: SyntaxKind.JsxFragment;
+ openingFragment: JsxOpeningFragment;
+ children: NodeArray<JsxChild>;
+ closingFragment: JsxClosingFragment;
+ }
+ export interface JsxOpeningFragment extends Expression {
+ kind: SyntaxKind.JsxOpeningFragment;
+ parent: JsxFragment;
+ }
+ export interface JsxClosingFragment extends Expression {
+ kind: SyntaxKind.JsxClosingFragment;
+ parent: JsxFragment;
+ }
+ export interface JsxAttribute extends ObjectLiteralElement {
+ kind: SyntaxKind.JsxAttribute;
+ parent: JsxAttributes;
+ name: Identifier;
+ initializer?: StringLiteral | JsxExpression;
+ }
+ export interface JsxSpreadAttribute extends ObjectLiteralElement {
+ kind: SyntaxKind.JsxSpreadAttribute;
+ parent: JsxAttributes;
+ expression: Expression;
+ }
+ export interface JsxClosingElement extends Node {
+ kind: SyntaxKind.JsxClosingElement;
+ parent: JsxElement;
+ tagName: JsxTagNameExpression;
+ }
+ export interface JsxExpression extends Expression {
+ kind: SyntaxKind.JsxExpression;
+ parent: JsxElement | JsxAttributeLike;
+ dotDotDotToken?: Token<SyntaxKind.DotDotDotToken>;
+ expression?: Expression;
+ }
+ export interface JsxText extends LiteralLikeNode {
+ kind: SyntaxKind.JsxText;
+ containsOnlyTriviaWhiteSpaces: boolean;
+ parent: JsxElement;
+ }
+ export type JsxChild = JsxText | JsxExpression | JsxElement | JsxSelfClosingElement | JsxFragment;
+ export interface Statement extends Node {
+ _statementBrand: any;
+ }
+ export interface NotEmittedStatement extends Statement {
+ kind: SyntaxKind.NotEmittedStatement;
+ }
+ /**
+ * A list of comma-separated expressions. This node is only created by transformations.
+ */
+ export interface CommaListExpression extends Expression {
+ kind: SyntaxKind.CommaListExpression;
+ elements: NodeArray<Expression>;
+ }
+ export interface EmptyStatement extends Statement {
+ kind: SyntaxKind.EmptyStatement;
+ }
+ export interface DebuggerStatement extends Statement {
+ kind: SyntaxKind.DebuggerStatement;
+ }
+ export interface MissingDeclaration extends DeclarationStatement {
+ kind: SyntaxKind.MissingDeclaration;
+ name?: Identifier;
+ }
+ export type BlockLike = SourceFile | Block | ModuleBlock | CaseOrDefaultClause;
+ export interface Block extends Statement {
+ kind: SyntaxKind.Block;
+ statements: NodeArray<Statement>;
+ }
+ export interface VariableStatement extends Statement, JSDocContainer {
+ kind: SyntaxKind.VariableStatement;
+ declarationList: VariableDeclarationList;
+ }
+ export interface ExpressionStatement extends Statement, JSDocContainer {
+ kind: SyntaxKind.ExpressionStatement;
+ expression: Expression;
+ }
+ export interface IfStatement extends Statement {
+ kind: SyntaxKind.IfStatement;
+ expression: Expression;
+ thenStatement: Statement;
+ elseStatement?: Statement;
+ }
+ export interface IterationStatement extends Statement {
+ statement: Statement;
+ }
+ export interface DoStatement extends IterationStatement {
+ kind: SyntaxKind.DoStatement;
+ expression: Expression;
+ }
+ export interface WhileStatement extends IterationStatement {
+ kind: SyntaxKind.WhileStatement;
+ expression: Expression;
+ }
+ export type ForInitializer = VariableDeclarationList | Expression;
+ export interface ForStatement extends IterationStatement {
+ kind: SyntaxKind.ForStatement;
+ initializer?: ForInitializer;
+ condition?: Expression;
+ incrementor?: Expression;
+ }
+ export type ForInOrOfStatement = ForInStatement | ForOfStatement;
+ export interface ForInStatement extends IterationStatement {
+ kind: SyntaxKind.ForInStatement;
+ initializer: ForInitializer;
+ expression: Expression;
+ }
+ export interface ForOfStatement extends IterationStatement {
+ kind: SyntaxKind.ForOfStatement;
+ awaitModifier?: AwaitKeywordToken;
+ initializer: ForInitializer;
+ expression: Expression;
+ }
+ export interface BreakStatement extends Statement {
+ kind: SyntaxKind.BreakStatement;
+ label?: Identifier;
+ }
+ export interface ContinueStatement extends Statement {
+ kind: SyntaxKind.ContinueStatement;
+ label?: Identifier;
+ }
+ export type BreakOrContinueStatement = BreakStatement | ContinueStatement;
+ export interface ReturnStatement extends Statement {
+ kind: SyntaxKind.ReturnStatement;
+ expression?: Expression;
+ }
+ export interface WithStatement extends Statement {
+ kind: SyntaxKind.WithStatement;
+ expression: Expression;
+ statement: Statement;
+ }
+ export interface SwitchStatement extends Statement {
+ kind: SyntaxKind.SwitchStatement;
+ expression: Expression;
+ caseBlock: CaseBlock;
+ possiblyExhaustive?: boolean;
+ }
+ export interface CaseBlock extends Node {
+ kind: SyntaxKind.CaseBlock;
+ parent: SwitchStatement;
+ clauses: NodeArray<CaseOrDefaultClause>;
+ }
+ export interface CaseClause extends Node {
+ kind: SyntaxKind.CaseClause;
+ parent: CaseBlock;
+ expression: Expression;
+ statements: NodeArray<Statement>;
+ }
+ export interface DefaultClause extends Node {
+ kind: SyntaxKind.DefaultClause;
+ parent: CaseBlock;
+ statements: NodeArray<Statement>;
+ }
+ export type CaseOrDefaultClause = CaseClause | DefaultClause;
+ export interface LabeledStatement extends Statement, JSDocContainer {
+ kind: SyntaxKind.LabeledStatement;
+ label: Identifier;
+ statement: Statement;
+ }
+ export interface ThrowStatement extends Statement {
+ kind: SyntaxKind.ThrowStatement;
+ expression?: Expression;
+ }
+ export interface TryStatement extends Statement {
+ kind: SyntaxKind.TryStatement;
+ tryBlock: Block;
+ catchClause?: CatchClause;
+ finallyBlock?: Block;
+ }
+ export interface CatchClause extends Node {
+ kind: SyntaxKind.CatchClause;
+ parent: TryStatement;
+ variableDeclaration?: VariableDeclaration;
+ block: Block;
+ }
+ export type ObjectTypeDeclaration = ClassLikeDeclaration | InterfaceDeclaration | TypeLiteralNode;
+ export type DeclarationWithTypeParameters = DeclarationWithTypeParameterChildren | JSDocTypedefTag | JSDocCallbackTag | JSDocSignature;
+ export type DeclarationWithTypeParameterChildren = SignatureDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | JSDocTemplateTag;
+ export interface ClassLikeDeclarationBase extends NamedDeclaration, JSDocContainer {
+ kind: SyntaxKind.ClassDeclaration | SyntaxKind.ClassExpression;
+ name?: Identifier;
+ typeParameters?: NodeArray<TypeParameterDeclaration>;
+ heritageClauses?: NodeArray<HeritageClause>;
+ members: NodeArray<ClassElement>;
+ }
+ export interface ClassDeclaration extends ClassLikeDeclarationBase, DeclarationStatement {
+ kind: SyntaxKind.ClassDeclaration;
+ /** May be undefined in `export default class { ... }`. */
+ name?: Identifier;
+ }
+ export interface ClassExpression extends ClassLikeDeclarationBase, PrimaryExpression {
+ kind: SyntaxKind.ClassExpression;
+ }
+ export type ClassLikeDeclaration = ClassDeclaration | ClassExpression;
+ export interface ClassElement extends NamedDeclaration {
+ _classElementBrand: any;
+ name?: PropertyName;
+ }
+ export interface TypeElement extends NamedDeclaration {
+ _typeElementBrand: any;
+ name?: PropertyName;
+ questionToken?: QuestionToken;
+ }
+ export interface InterfaceDeclaration extends DeclarationStatement, JSDocContainer {
+ kind: SyntaxKind.InterfaceDeclaration;
+ name: Identifier;
+ typeParameters?: NodeArray<TypeParameterDeclaration>;
+ heritageClauses?: NodeArray<HeritageClause>;
+ members: NodeArray<TypeElement>;
+ }
+ export interface HeritageClause extends Node {
+ kind: SyntaxKind.HeritageClause;
+ parent: InterfaceDeclaration | ClassLikeDeclaration;
+ token: SyntaxKind.ExtendsKeyword | SyntaxKind.ImplementsKeyword;
+ types: NodeArray<ExpressionWithTypeArguments>;
+ }
+ export interface TypeAliasDeclaration extends DeclarationStatement, JSDocContainer {
+ kind: SyntaxKind.TypeAliasDeclaration;
+ name: Identifier;
+ typeParameters?: NodeArray<TypeParameterDeclaration>;
+ type: TypeNode;
+ }
+ export interface EnumMember extends NamedDeclaration, JSDocContainer {
+ kind: SyntaxKind.EnumMember;
+ parent: EnumDeclaration;
+ name: PropertyName;
+ initializer?: Expression;
+ }
+ export interface EnumDeclaration extends DeclarationStatement, JSDocContainer {
+ kind: SyntaxKind.EnumDeclaration;
+ name: Identifier;
+ members: NodeArray<EnumMember>;
+ }
+ export type ModuleName = Identifier | StringLiteral;
+ export type ModuleBody = NamespaceBody | JSDocNamespaceBody;
+ export interface ModuleDeclaration extends DeclarationStatement, JSDocContainer {
+ kind: SyntaxKind.ModuleDeclaration;
+ parent: ModuleBody | SourceFile;
+ name: ModuleName;
+ body?: ModuleBody | JSDocNamespaceDeclaration;
+ }
+ export type NamespaceBody = ModuleBlock | NamespaceDeclaration;
+ export interface NamespaceDeclaration extends ModuleDeclaration {
+ name: Identifier;
+ body: NamespaceBody;
+ }
+ export type JSDocNamespaceBody = Identifier | JSDocNamespaceDeclaration;
+ export interface JSDocNamespaceDeclaration extends ModuleDeclaration {
+ name: Identifier;
+ body?: JSDocNamespaceBody;
+ }
+ export interface ModuleBlock extends Node, Statement {
+ kind: SyntaxKind.ModuleBlock;
+ parent: ModuleDeclaration;
+ statements: NodeArray<Statement>;
+ }
+ export type ModuleReference = EntityName | ExternalModuleReference;
+ /**
+ * One of:
+ * - import x = require("mod");
+ * - import x = M.x;
+ */
+ export interface ImportEqualsDeclaration extends DeclarationStatement, JSDocContainer {
+ kind: SyntaxKind.ImportEqualsDeclaration;
+ parent: SourceFile | ModuleBlock;
+ name: Identifier;
+ moduleReference: ModuleReference;
+ }
+ export interface ExternalModuleReference extends Node {
+ kind: SyntaxKind.ExternalModuleReference;
+ parent: ImportEqualsDeclaration;
+ expression: Expression;
+ }
+ export interface ImportDeclaration extends Statement {
+ kind: SyntaxKind.ImportDeclaration;
+ parent: SourceFile | ModuleBlock;
+ importClause?: ImportClause;
+ /** If this is not a StringLiteral it will be a grammar error. */
+ moduleSpecifier: Expression;
+ }
+ export type NamedImportBindings = NamespaceImport | NamedImports;
+ export type NamedExportBindings = NamespaceExport | NamedExports;
+ export interface ImportClause extends NamedDeclaration {
+ kind: SyntaxKind.ImportClause;
+ parent: ImportDeclaration;
+ isTypeOnly: boolean;
+ name?: Identifier;
+ namedBindings?: NamedImportBindings;
+ }
+ export interface NamespaceImport extends NamedDeclaration {
+ kind: SyntaxKind.NamespaceImport;
+ parent: ImportClause;
+ name: Identifier;
+ }
+ export interface NamespaceExport extends NamedDeclaration {
+ kind: SyntaxKind.NamespaceExport;
+ parent: ExportDeclaration;
+ name: Identifier;
+ }
+ export interface NamespaceExportDeclaration extends DeclarationStatement {
+ kind: SyntaxKind.NamespaceExportDeclaration;
+ name: Identifier;
+ }
+ export interface ExportDeclaration extends DeclarationStatement, JSDocContainer {
+ kind: SyntaxKind.ExportDeclaration;
+ parent: SourceFile | ModuleBlock;
+ isTypeOnly: boolean;
+ /** Will not be assigned in the case of `export * from "foo";` */
+ exportClause?: NamedExportBindings;
+ /** If this is not a StringLiteral it will be a grammar error. */
+ moduleSpecifier?: Expression;
+ }
+ export interface NamedImports extends Node {
+ kind: SyntaxKind.NamedImports;
+ parent: ImportClause;
+ elements: NodeArray<ImportSpecifier>;
+ }
+ export interface NamedExports extends Node {
+ kind: SyntaxKind.NamedExports;
+ parent: ExportDeclaration;
+ elements: NodeArray<ExportSpecifier>;
+ }
+ export type NamedImportsOrExports = NamedImports | NamedExports;
+ export interface ImportSpecifier extends NamedDeclaration {
+ kind: SyntaxKind.ImportSpecifier;
+ parent: NamedImports;
+ propertyName?: Identifier;
+ name: Identifier;
+ }
+ export interface ExportSpecifier extends NamedDeclaration {
+ kind: SyntaxKind.ExportSpecifier;
+ parent: NamedExports;
+ propertyName?: Identifier;
+ name: Identifier;
+ }
+ export type ImportOrExportSpecifier = ImportSpecifier | ExportSpecifier;
+ export type TypeOnlyCompatibleAliasDeclaration = ImportClause | NamespaceImport | ImportOrExportSpecifier;
+ /**
+ * This is either an `export =` or an `export default` declaration.
+ * Unless `isExportEquals` is set, this node was parsed as an `export default`.
+ */
+ export interface ExportAssignment extends DeclarationStatement {
+ kind: SyntaxKind.ExportAssignment;
+ parent: SourceFile;
+ isExportEquals?: boolean;
+ expression: Expression;
+ }
+ export interface FileReference extends TextRange {
+ fileName: string;
+ }
+ export interface CheckJsDirective extends TextRange {
+ enabled: boolean;
+ }
+ export type CommentKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia;
+ export interface CommentRange extends TextRange {
+ hasTrailingNewLine?: boolean;
+ kind: CommentKind;
+ }
+ export interface SynthesizedComment extends CommentRange {
+ text: string;
+ pos: -1;
+ end: -1;
+ }
+ export interface JSDocTypeExpression extends TypeNode {
+ kind: SyntaxKind.JSDocTypeExpression;
+ type: TypeNode;
+ }
+ export interface JSDocType extends TypeNode {
+ _jsDocTypeBrand: any;
+ }
+ export interface JSDocAllType extends JSDocType {
+ kind: SyntaxKind.JSDocAllType;
+ }
+ export interface JSDocUnknownType extends JSDocType {
+ kind: SyntaxKind.JSDocUnknownType;
+ }
+ export interface JSDocNonNullableType extends JSDocType {
+ kind: SyntaxKind.JSDocNonNullableType;
+ type: TypeNode;
+ }
+ export interface JSDocNullableType extends JSDocType {
+ kind: SyntaxKind.JSDocNullableType;
+ type: TypeNode;
+ }
+ export interface JSDocOptionalType extends JSDocType {
+ kind: SyntaxKind.JSDocOptionalType;
+ type: TypeNode;
+ }
+ export interface JSDocFunctionType extends JSDocType, SignatureDeclarationBase {
+ kind: SyntaxKind.JSDocFunctionType;
+ }
+ export interface JSDocVariadicType extends JSDocType {
+ kind: SyntaxKind.JSDocVariadicType;
+ type: TypeNode;
+ }
+ export interface JSDocNamepathType extends JSDocType {
+ kind: SyntaxKind.JSDocNamepathType;
+ type: TypeNode;
+ }
+ export type JSDocTypeReferencingNode = JSDocVariadicType | JSDocOptionalType | JSDocNullableType | JSDocNonNullableType;
+ export interface JSDoc extends Node {
+ kind: SyntaxKind.JSDocComment;
+ parent: HasJSDoc;
+ tags?: NodeArray<JSDocTag>;
+ comment?: string;
+ }
+ export interface JSDocTag extends Node {
+ parent: JSDoc | JSDocTypeLiteral;
+ tagName: Identifier;
+ comment?: string;
+ }
+ export interface JSDocUnknownTag extends JSDocTag {
+ kind: SyntaxKind.JSDocTag;
+ }
+ /**
+ * Note that `@extends` is a synonym of `@augments`.
+ * Both tags are represented by this interface.
+ */
+ export interface JSDocAugmentsTag extends JSDocTag {
+ kind: SyntaxKind.JSDocAugmentsTag;
+ class: ExpressionWithTypeArguments & {
+ expression: Identifier | PropertyAccessEntityNameExpression;
+ };
+ }
+ export interface JSDocImplementsTag extends JSDocTag {
+ kind: SyntaxKind.JSDocImplementsTag;
+ class: ExpressionWithTypeArguments & {
+ expression: Identifier | PropertyAccessEntityNameExpression;
+ };
+ }
+ export interface JSDocAuthorTag extends JSDocTag {
+ kind: SyntaxKind.JSDocAuthorTag;
+ }
+ export interface JSDocClassTag extends JSDocTag {
+ kind: SyntaxKind.JSDocClassTag;
+ }
+ export interface JSDocPublicTag extends JSDocTag {
+ kind: SyntaxKind.JSDocPublicTag;
+ }
+ export interface JSDocPrivateTag extends JSDocTag {
+ kind: SyntaxKind.JSDocPrivateTag;
+ }
+ export interface JSDocProtectedTag extends JSDocTag {
+ kind: SyntaxKind.JSDocProtectedTag;
+ }
+ export interface JSDocReadonlyTag extends JSDocTag {
+ kind: SyntaxKind.JSDocReadonlyTag;
+ }
+ export interface JSDocEnumTag extends JSDocTag, Declaration {
+ parent: JSDoc;
+ kind: SyntaxKind.JSDocEnumTag;
+ typeExpression?: JSDocTypeExpression;
+ }
+ export interface JSDocThisTag extends JSDocTag {
+ kind: SyntaxKind.JSDocThisTag;
+ typeExpression?: JSDocTypeExpression;
+ }
+ export interface JSDocTemplateTag extends JSDocTag {
+ kind: SyntaxKind.JSDocTemplateTag;
+ constraint: JSDocTypeExpression | undefined;
+ typeParameters: NodeArray<TypeParameterDeclaration>;
+ }
+ export interface JSDocReturnTag extends JSDocTag {
+ kind: SyntaxKind.JSDocReturnTag;
+ typeExpression?: JSDocTypeExpression;
+ }
+ export interface JSDocTypeTag extends JSDocTag {
+ kind: SyntaxKind.JSDocTypeTag;
+ typeExpression: JSDocTypeExpression;
+ }
+ export interface JSDocTypedefTag extends JSDocTag, NamedDeclaration {
+ parent: JSDoc;
+ kind: SyntaxKind.JSDocTypedefTag;
+ fullName?: JSDocNamespaceDeclaration | Identifier;
+ name?: Identifier;
+ typeExpression?: JSDocTypeExpression | JSDocTypeLiteral;
+ }
+ export interface JSDocCallbackTag extends JSDocTag, NamedDeclaration {
+ parent: JSDoc;
+ kind: SyntaxKind.JSDocCallbackTag;
+ fullName?: JSDocNamespaceDeclaration | Identifier;
+ name?: Identifier;
+ typeExpression: JSDocSignature;
+ }
+ export interface JSDocSignature extends JSDocType, Declaration {
+ kind: SyntaxKind.JSDocSignature;
+ typeParameters?: readonly JSDocTemplateTag[];
+ parameters: readonly JSDocParameterTag[];
+ type: JSDocReturnTag | undefined;
+ }
+ export interface JSDocPropertyLikeTag extends JSDocTag, Declaration {
+ parent: JSDoc;
+ name: EntityName;
+ typeExpression?: JSDocTypeExpression;
+ /** Whether the property name came before the type -- non-standard for JSDoc, but Typescript-like */
+ isNameFirst: boolean;
+ isBracketed: boolean;
+ }
+ export interface JSDocPropertyTag extends JSDocPropertyLikeTag {
+ kind: SyntaxKind.JSDocPropertyTag;
+ }
+ export interface JSDocParameterTag extends JSDocPropertyLikeTag {
+ kind: SyntaxKind.JSDocParameterTag;
+ }
+ export interface JSDocTypeLiteral extends JSDocType {
+ kind: SyntaxKind.JSDocTypeLiteral;
+ jsDocPropertyTags?: readonly JSDocPropertyLikeTag[];
+ /** If true, then this type literal represents an *array* of its type. */
+ isArrayType?: boolean;
+ }
+ export enum FlowFlags {
+ Unreachable = 1,
+ Start = 2,
+ BranchLabel = 4,
+ LoopLabel = 8,
+ Assignment = 16,
+ TrueCondition = 32,
+ FalseCondition = 64,
+ SwitchClause = 128,
+ ArrayMutation = 256,
+ Call = 512,
+ ReduceLabel = 1024,
+ Referenced = 2048,
+ Shared = 4096,
+ Label = 12,
+ Condition = 96
+ }
+ export type FlowNode = AfterFinallyFlow | PreFinallyFlow | FlowStart | FlowLabel | FlowAssignment | FlowCall | FlowCondition | FlowSwitchClause | FlowArrayMutation;
+ export interface FlowNodeBase {
+ flags: FlowFlags;
+ id?: number;
+ }
+ export interface FlowLock {
+ locked?: boolean;
+ }
+ export interface AfterFinallyFlow extends FlowNodeBase, FlowLock {
+ antecedent: FlowNode;
+ }
+ export interface PreFinallyFlow extends FlowNodeBase {
+ antecedent: FlowNode;
+ lock: FlowLock;
+ }
+ export interface FlowStart extends FlowNodeBase {
+ node?: FunctionExpression | ArrowFunction | MethodDeclaration;
+ }
+ export interface FlowLabel extends FlowNodeBase {
+ antecedents: FlowNode[] | undefined;
+ }
+ export interface FlowAssignment extends FlowNodeBase {
+ node: Expression | VariableDeclaration | BindingElement;
+ antecedent: FlowNode;
+ }
+ export interface FlowCall extends FlowNodeBase {
+ node: CallExpression;
+ antecedent: FlowNode;
+ }
+ export interface FlowCondition extends FlowNodeBase {
+ node: Expression;
+ antecedent: FlowNode;
+ }
+ export interface FlowSwitchClause extends FlowNodeBase {
+ switchStatement: SwitchStatement;
+ clauseStart: number;
+ clauseEnd: number;
+ antecedent: FlowNode;
+ }
+ export interface FlowArrayMutation extends FlowNodeBase {
+ node: CallExpression | BinaryExpression;
+ antecedent: FlowNode;
+ }
+ export interface FlowReduceLabel extends FlowNodeBase {
+ target: FlowLabel;
+ antecedents: FlowNode[];
+ antecedent: FlowNode;
+ }
+ export type FlowType = Type | IncompleteType;
+ export interface IncompleteType {
+ flags: TypeFlags;
+ type: Type;
+ }
+ export interface AmdDependency {
+ path: string;
+ name?: string;
+ }
+ export interface SourceFile extends Declaration {
+ kind: SyntaxKind.SourceFile;
+ statements: NodeArray<Statement>;
+ endOfFileToken: Token<SyntaxKind.EndOfFileToken>;
+ fileName: string;
+ text: string;
+ amdDependencies: readonly AmdDependency[];
+ moduleName?: string;
+ referencedFiles: readonly FileReference[];
+ typeReferenceDirectives: readonly FileReference[];
+ libReferenceDirectives: readonly FileReference[];
+ languageVariant: LanguageVariant;
+ isDeclarationFile: boolean;
+ /**
+ * lib.d.ts should have a reference comment like
+ *
+ * /// <reference no-default-lib="true"/>
+ *
+ * If any other file has this comment, it signals not to include lib.d.ts
+ * because this containing file is intended to act as a default library.
+ */
+ hasNoDefaultLib: boolean;
+ languageVersion: ScriptTarget;
+ }
+ export interface Bundle extends Node {
+ kind: SyntaxKind.Bundle;
+ prepends: readonly (InputFiles | UnparsedSource)[];
+ sourceFiles: readonly SourceFile[];
+ }
+ export interface InputFiles extends Node {
+ kind: SyntaxKind.InputFiles;
+ javascriptPath?: string;
+ javascriptText: string;
+ javascriptMapPath?: string;
+ javascriptMapText?: string;
+ declarationPath?: string;
+ declarationText: string;
+ declarationMapPath?: string;
+ declarationMapText?: string;
+ }
+ export interface UnparsedSource extends Node {
+ kind: SyntaxKind.UnparsedSource;
+ fileName: string;
+ text: string;
+ prologues: readonly UnparsedPrologue[];
+ helpers: readonly UnscopedEmitHelper[] | undefined;
+ referencedFiles: readonly FileReference[];
+ typeReferenceDirectives: readonly string[] | undefined;
+ libReferenceDirectives: readonly FileReference[];
+ hasNoDefaultLib?: boolean;
+ sourceMapPath?: string;
+ sourceMapText?: string;
+ syntheticReferences?: readonly UnparsedSyntheticReference[];
+ texts: readonly UnparsedSourceText[];
+ }
+ export type UnparsedSourceText = UnparsedPrepend | UnparsedTextLike;
+ export type UnparsedNode = UnparsedPrologue | UnparsedSourceText | UnparsedSyntheticReference;
+ export interface UnparsedSection extends Node {
+ kind: SyntaxKind;
+ data?: string;
+ parent: UnparsedSource;
+ }
+ export interface UnparsedPrologue extends UnparsedSection {
+ kind: SyntaxKind.UnparsedPrologue;
+ data: string;
+ parent: UnparsedSource;
+ }
+ export interface UnparsedPrepend extends UnparsedSection {
+ kind: SyntaxKind.UnparsedPrepend;
+ data: string;
+ parent: UnparsedSource;
+ texts: readonly UnparsedTextLike[];
+ }
+ export interface UnparsedTextLike extends UnparsedSection {
+ kind: SyntaxKind.UnparsedText | SyntaxKind.UnparsedInternalText;
+ parent: UnparsedSource;
+ }
+ export interface UnparsedSyntheticReference extends UnparsedSection {
+ kind: SyntaxKind.UnparsedSyntheticReference;
+ parent: UnparsedSource;
+ }
+ export interface JsonSourceFile extends SourceFile {
+ statements: NodeArray<JsonObjectExpressionStatement>;
+ }
+ export interface TsConfigSourceFile extends JsonSourceFile {
+ extendedSourceFiles?: string[];
+ }
+ export interface JsonMinusNumericLiteral extends PrefixUnaryExpression {
+ kind: SyntaxKind.PrefixUnaryExpression;
+ operator: SyntaxKind.MinusToken;
+ operand: NumericLiteral;
+ }
+ export interface JsonObjectExpressionStatement extends ExpressionStatement {
+ expression: ObjectLiteralExpression | ArrayLiteralExpression | JsonMinusNumericLiteral | NumericLiteral | StringLiteral | BooleanLiteral | NullLiteral;
+ }
+ export interface ScriptReferenceHost {
+ getCompilerOptions(): CompilerOptions;
+ getSourceFile(fileName: string): SourceFile | undefined;
+ getSourceFileByPath(path: Path): SourceFile | undefined;
+ getCurrentDirectory(): string;
+ }
+ export interface ParseConfigHost {
+ useCaseSensitiveFileNames: boolean;
+ readDirectory(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[], depth?: number): readonly string[];
+ /**
+ * Gets a value indicating whether the specified path exists and is a file.
+ * @param path The path to test.
+ */
+ fileExists(path: string): boolean;
+ readFile(path: string): string | undefined;
+ trace?(s: string): void;
+ }
+ /**
+ * Branded string for keeping track of when we've turned an ambiguous path
+ * specified like "./blah" to an absolute path to an actual
+ * tsconfig file, e.g. "/root/blah/tsconfig.json"
+ */
+ export type ResolvedConfigFileName = string & {
+ _isResolvedConfigFileName: never;
+ };
+ export type WriteFileCallback = (fileName: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void, sourceFiles?: readonly SourceFile[]) => void;
+ export class OperationCanceledException {
+ }
+ export interface CancellationToken {
+ isCancellationRequested(): boolean;
+ /** @throws OperationCanceledException if isCancellationRequested is true */
+ throwIfCancellationRequested(): void;
+ }
+ export interface Program extends ScriptReferenceHost {
+ getCurrentDirectory(): string;
+ /**
+ * Get a list of root file names that were passed to a 'createProgram'
+ */
+ getRootFileNames(): readonly string[];
+ /**
+ * Get a list of files in the program
+ */
+ getSourceFiles(): readonly SourceFile[];
+ /**
+ * Emits the JavaScript and declaration files. If targetSourceFile is not specified, then
+ * the JavaScript and declaration files will be produced for all the files in this program.
+ * If targetSourceFile is specified, then only the JavaScript and declaration for that
+ * specific file will be generated.
+ *
+ * If writeFile is not specified then the writeFile callback from the compiler host will be
+ * used for writing the JavaScript and declaration files. Otherwise, the writeFile parameter
+ * will be invoked when writing the JavaScript and declaration files.
+ */
+ emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): EmitResult;
+ getOptionsDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[];
+ getGlobalDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[];
+ getSyntacticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly DiagnosticWithLocation[];
+ /** The first time this is called, it will return global diagnostics (no location). */
+ getSemanticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[];
+ getDeclarationDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly DiagnosticWithLocation[];
+ getConfigFileParsingDiagnostics(): readonly Diagnostic[];
+ /**
+ * Gets a type checker that can be used to semantically analyze source files in the program.
+ */
+ getTypeChecker(): TypeChecker;
+ getNodeCount(): number;
+ getIdentifierCount(): number;
+ getSymbolCount(): number;
+ getTypeCount(): number;
+ getInstantiationCount(): number;
+ getRelationCacheSizes(): {
+ assignable: number;
+ identity: number;
+ subtype: number;
+ strictSubtype: number;
+ };
+ isSourceFileFromExternalLibrary(file: SourceFile): boolean;
+ isSourceFileDefaultLibrary(file: SourceFile): boolean;
+ getProjectReferences(): readonly ProjectReference[] | undefined;
+ getResolvedProjectReferences(): readonly (ResolvedProjectReference | undefined)[] | undefined;
+ }
+ export interface ResolvedProjectReference {
+ commandLine: ParsedCommandLine;
+ sourceFile: SourceFile;
+ references?: readonly (ResolvedProjectReference | undefined)[];
+ }
+ export type CustomTransformerFactory = (context: TransformationContext) => CustomTransformer;
+ export interface CustomTransformer {
+ transformSourceFile(node: SourceFile): SourceFile;
+ transformBundle(node: Bundle): Bundle;
+ }
+ export interface CustomTransformers {
+ /** Custom transformers to evaluate before built-in .js transformations. */
+ before?: (TransformerFactory<SourceFile> | CustomTransformerFactory)[];
+ /** Custom transformers to evaluate after built-in .js transformations. */
+ after?: (TransformerFactory<SourceFile> | CustomTransformerFactory)[];
+ /** Custom transformers to evaluate after built-in .d.ts transformations. */
+ afterDeclarations?: (TransformerFactory<Bundle | SourceFile> | CustomTransformerFactory)[];
+ }
+ export interface SourceMapSpan {
+ /** Line number in the .js file. */
+ emittedLine: number;
+ /** Column number in the .js file. */
+ emittedColumn: number;
+ /** Line number in the .ts file. */
+ sourceLine: number;
+ /** Column number in the .ts file. */
+ sourceColumn: number;
+ /** Optional name (index into names array) associated with this span. */
+ nameIndex?: number;
+ /** .ts file (index into sources array) associated with this span */
+ sourceIndex: number;
+ }
+ /** Return code used by getEmitOutput function to indicate status of the function */
+ export enum ExitStatus {
+ Success = 0,
+ DiagnosticsPresent_OutputsSkipped = 1,
+ DiagnosticsPresent_OutputsGenerated = 2,
+ InvalidProject_OutputsSkipped = 3,
+ ProjectReferenceCycle_OutputsSkipped = 4,
+ /** @deprecated Use ProjectReferenceCycle_OutputsSkipped instead. */
+ ProjectReferenceCycle_OutputsSkupped = 4
+ }
+ export interface EmitResult {
+ emitSkipped: boolean;
+ /** Contains declaration emit diagnostics */
+ diagnostics: readonly Diagnostic[];
+ emittedFiles?: string[];
+ }
+ export interface TypeChecker {
+ getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type;
+ getDeclaredTypeOfSymbol(symbol: Symbol): Type;
+ getPropertiesOfType(type: Type): Symbol[];
+ getPropertyOfType(type: Type, propertyName: string): Symbol | undefined;
+ getPrivateIdentifierPropertyOfType(leftType: Type, name: string, location: Node): Symbol | undefined;
+ getIndexInfoOfType(type: Type, kind: IndexKind): IndexInfo | undefined;
+ getSignaturesOfType(type: Type, kind: SignatureKind): readonly Signature[];
+ getIndexTypeOfType(type: Type, kind: IndexKind): Type | undefined;
+ getBaseTypes(type: InterfaceType): BaseType[];
+ getBaseTypeOfLiteralType(type: Type): Type;
+ getWidenedType(type: Type): Type;
+ getReturnTypeOfSignature(signature: Signature): Type;
+ getNullableType(type: Type, flags: TypeFlags): Type;
+ getNonNullableType(type: Type): Type;
+ getTypeArguments(type: TypeReference): readonly Type[];
+ /** Note that the resulting nodes cannot be checked. */
+ typeToTypeNode(type: Type, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): TypeNode | undefined;
+ /** Note that the resulting nodes cannot be checked. */
+ signatureToSignatureDeclaration(signature: Signature, kind: SyntaxKind, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): (SignatureDeclaration & {
+ typeArguments?: NodeArray<TypeNode>;
+ }) | undefined;
+ /** Note that the resulting nodes cannot be checked. */
+ indexInfoToIndexSignatureDeclaration(indexInfo: IndexInfo, kind: IndexKind, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): IndexSignatureDeclaration | undefined;
+ /** Note that the resulting nodes cannot be checked. */
+ symbolToEntityName(symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): EntityName | undefined;
+ /** Note that the resulting nodes cannot be checked. */
+ symbolToExpression(symbol: Symbol, meaning: SymbolFlags, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): Expression | undefined;
+ /** Note that the resulting nodes cannot be checked. */
+ symbolToTypeParameterDeclarations(symbol: Symbol, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): NodeArray<TypeParameterDeclaration> | undefined;
+ /** Note that the resulting nodes cannot be checked. */
+ symbolToParameterDeclaration(symbol: Symbol, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): ParameterDeclaration | undefined;
+ /** Note that the resulting nodes cannot be checked. */
+ typeParameterToDeclaration(parameter: TypeParameter, enclosingDeclaration?: Node, flags?: NodeBuilderFlags): TypeParameterDeclaration | undefined;
+ getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[];
+ getSymbolAtLocation(node: Node): Symbol | undefined;
+ getSymbolsOfParameterPropertyDeclaration(parameter: ParameterDeclaration, parameterName: string): Symbol[];
+ /**
+ * The function returns the value (local variable) symbol of an identifier in the short-hand property assignment.
+ * This is necessary as an identifier in short-hand property assignment can contains two meaning: property name and property value.
+ */
+ getShorthandAssignmentValueSymbol(location: Node): Symbol | undefined;
+ getExportSpecifierLocalTargetSymbol(location: ExportSpecifier): Symbol | undefined;
+ /**
+ * If a symbol is a local symbol with an associated exported symbol, returns the exported symbol.
+ * Otherwise returns its input.
+ * For example, at `export type T = number;`:
+ * - `getSymbolAtLocation` at the location `T` will return the exported symbol for `T`.
+ * - But the result of `getSymbolsInScope` will contain the *local* symbol for `T`, not the exported symbol.
+ * - Calling `getExportSymbolOfSymbol` on that local symbol will return the exported symbol.
+ */
+ getExportSymbolOfSymbol(symbol: Symbol): Symbol;
+ getPropertySymbolOfDestructuringAssignment(location: Identifier): Symbol | undefined;
+ getTypeOfAssignmentPattern(pattern: AssignmentPattern): Type;
+ getTypeAtLocation(node: Node): Type;
+ getTypeFromTypeNode(node: TypeNode): Type;
+ signatureToString(signature: Signature, enclosingDeclaration?: Node, flags?: TypeFormatFlags, kind?: SignatureKind): string;
+ typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string;
+ symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): string;
+ typePredicateToString(predicate: TypePredicate, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string;
+ getFullyQualifiedName(symbol: Symbol): string;
+ getAugmentedPropertiesOfType(type: Type): Symbol[];
+ getRootSymbols(symbol: Symbol): readonly Symbol[];
+ getContextualType(node: Expression): Type | undefined;
+ /**
+ * returns unknownSignature in the case of an error.
+ * returns undefined if the node is not valid.
+ * @param argumentCount Apparent number of arguments, passed in case of a possibly incomplete call. This should come from an ArgumentListInfo. See `signatureHelp.ts`.
+ */
+ getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[], argumentCount?: number): Signature | undefined;
+ getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature | undefined;
+ isImplementationOfOverload(node: SignatureDeclaration): boolean | undefined;
+ isUndefinedSymbol(symbol: Symbol): boolean;
+ isArgumentsSymbol(symbol: Symbol): boolean;
+ isUnknownSymbol(symbol: Symbol): boolean;
+ getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): string | number | undefined;
+ isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName | ImportTypeNode, propertyName: string): boolean;
+ /** Follow all aliases to get the original symbol. */
+ getAliasedSymbol(symbol: Symbol): Symbol;
+ getExportsOfModule(moduleSymbol: Symbol): Symbol[];
+ getJsxIntrinsicTagNamesAt(location: Node): Symbol[];
+ isOptionalParameter(node: ParameterDeclaration): boolean;
+ getAmbientModules(): Symbol[];
+ tryGetMemberInModuleExports(memberName: string, moduleSymbol: Symbol): Symbol | undefined;
+ getApparentType(type: Type): Type;
+ getBaseConstraintOfType(type: Type): Type | undefined;
+ getDefaultFromTypeParameter(type: Type): Type | undefined;
+ /**
+ * Depending on the operation performed, it may be appropriate to throw away the checker
+ * if the cancellation token is triggered. Typically, if it is used for error checking
+ * and the operation is cancelled, then it should be discarded, otherwise it is safe to keep.
+ */
+ runWithCancellationToken<T>(token: CancellationToken, cb: (checker: TypeChecker) => T): T;
+ }
+ export enum NodeBuilderFlags {
+ None = 0,
+ NoTruncation = 1,
+ WriteArrayAsGenericType = 2,
+ GenerateNamesForShadowedTypeParams = 4,
+ UseStructuralFallback = 8,
+ ForbidIndexedAccessSymbolReferences = 16,
+ WriteTypeArgumentsOfSignature = 32,
+ UseFullyQualifiedType = 64,
+ UseOnlyExternalAliasing = 128,
+ SuppressAnyReturnType = 256,
+ WriteTypeParametersInQualifiedName = 512,
+ MultilineObjectLiterals = 1024,
+ WriteClassExpressionAsTypeLiteral = 2048,
+ UseTypeOfFunction = 4096,
+ OmitParameterModifiers = 8192,
+ UseAliasDefinedOutsideCurrentScope = 16384,
+ UseSingleQuotesForStringLiteralType = 268435456,
+ NoTypeReduction = 536870912,
+ AllowThisInObjectLiteral = 32768,
+ AllowQualifedNameInPlaceOfIdentifier = 65536,
+ AllowAnonymousIdentifier = 131072,
+ AllowEmptyUnionOrIntersection = 262144,
+ AllowEmptyTuple = 524288,
+ AllowUniqueESSymbolType = 1048576,
+ AllowEmptyIndexInfoType = 2097152,
+ AllowNodeModulesRelativePaths = 67108864,
+ IgnoreErrors = 70221824,
+ InObjectTypeLiteral = 4194304,
+ InTypeAlias = 8388608,
+ InInitialEntityName = 16777216,
+ InReverseMappedType = 33554432
+ }
+ export enum TypeFormatFlags {
+ None = 0,
+ NoTruncation = 1,
+ WriteArrayAsGenericType = 2,
+ UseStructuralFallback = 8,
+ WriteTypeArgumentsOfSignature = 32,
+ UseFullyQualifiedType = 64,
+ SuppressAnyReturnType = 256,
+ MultilineObjectLiterals = 1024,
+ WriteClassExpressionAsTypeLiteral = 2048,
+ UseTypeOfFunction = 4096,
+ OmitParameterModifiers = 8192,
+ UseAliasDefinedOutsideCurrentScope = 16384,
+ UseSingleQuotesForStringLiteralType = 268435456,
+ NoTypeReduction = 536870912,
+ AllowUniqueESSymbolType = 1048576,
+ AddUndefined = 131072,
+ WriteArrowStyleSignature = 262144,
+ InArrayType = 524288,
+ InElementType = 2097152,
+ InFirstTypeArgument = 4194304,
+ InTypeAlias = 8388608,
+ /** @deprecated */ WriteOwnNameForAnyLike = 0,
+ NodeBuilderFlagsMask = 814775659
+ }
+ export enum SymbolFormatFlags {
+ None = 0,
+ WriteTypeParametersOrArguments = 1,
+ UseOnlyExternalAliasing = 2,
+ AllowAnyNodeKind = 4,
+ UseAliasDefinedOutsideCurrentScope = 8,
+ }
+ export enum TypePredicateKind {
+ This = 0,
+ Identifier = 1,
+ AssertsThis = 2,
+ AssertsIdentifier = 3
+ }
+ export interface TypePredicateBase {
+ kind: TypePredicateKind;
+ type: Type | undefined;
+ }
+ export interface ThisTypePredicate extends TypePredicateBase {
+ kind: TypePredicateKind.This;
+ parameterName: undefined;
+ parameterIndex: undefined;
+ type: Type;
+ }
+ export interface IdentifierTypePredicate extends TypePredicateBase {
+ kind: TypePredicateKind.Identifier;
+ parameterName: string;
+ parameterIndex: number;
+ type: Type;
+ }
+ export interface AssertsThisTypePredicate extends TypePredicateBase {
+ kind: TypePredicateKind.AssertsThis;
+ parameterName: undefined;
+ parameterIndex: undefined;
+ type: Type | undefined;
+ }
+ export interface AssertsIdentifierTypePredicate extends TypePredicateBase {
+ kind: TypePredicateKind.AssertsIdentifier;
+ parameterName: string;
+ parameterIndex: number;
+ type: Type | undefined;
+ }
+ export type TypePredicate = ThisTypePredicate | IdentifierTypePredicate | AssertsThisTypePredicate | AssertsIdentifierTypePredicate;
+ export enum SymbolFlags {
+ None = 0,
+ FunctionScopedVariable = 1,
+ BlockScopedVariable = 2,
+ Property = 4,
+ EnumMember = 8,
+ Function = 16,
+ Class = 32,
+ Interface = 64,
+ ConstEnum = 128,
+ RegularEnum = 256,
+ ValueModule = 512,
+ NamespaceModule = 1024,
+ TypeLiteral = 2048,
+ ObjectLiteral = 4096,
+ Method = 8192,
+ Constructor = 16384,
+ GetAccessor = 32768,
+ SetAccessor = 65536,
+ Signature = 131072,
+ TypeParameter = 262144,
+ TypeAlias = 524288,
+ ExportValue = 1048576,
+ Alias = 2097152,
+ Prototype = 4194304,
+ ExportStar = 8388608,
+ Optional = 16777216,
+ Transient = 33554432,
+ Assignment = 67108864,
+ ModuleExports = 134217728,
+ Enum = 384,
+ Variable = 3,
+ Value = 111551,
+ Type = 788968,
+ Namespace = 1920,
+ Module = 1536,
+ Accessor = 98304,
+ FunctionScopedVariableExcludes = 111550,
+ BlockScopedVariableExcludes = 111551,
+ ParameterExcludes = 111551,
+ PropertyExcludes = 0,
+ EnumMemberExcludes = 900095,
+ FunctionExcludes = 110991,
+ ClassExcludes = 899503,
+ InterfaceExcludes = 788872,
+ RegularEnumExcludes = 899327,
+ ConstEnumExcludes = 899967,
+ ValueModuleExcludes = 110735,
+ NamespaceModuleExcludes = 0,
+ MethodExcludes = 103359,
+ GetAccessorExcludes = 46015,
+ SetAccessorExcludes = 78783,
+ TypeParameterExcludes = 526824,
+ TypeAliasExcludes = 788968,
+ AliasExcludes = 2097152,
+ ModuleMember = 2623475,
+ ExportHasLocal = 944,
+ BlockScoped = 418,
+ PropertyOrAccessor = 98308,
+ ClassMember = 106500,
+ }
+ export interface Symbol {
+ flags: SymbolFlags;
+ escapedName: __String;
+ declarations: Declaration[];
+ valueDeclaration: Declaration;
+ members?: SymbolTable;
+ exports?: SymbolTable;
+ globalExports?: SymbolTable;
+ }
+ export enum InternalSymbolName {
+ Call = "__call",
+ Constructor = "__constructor",
+ New = "__new",
+ Index = "__index",
+ ExportStar = "__export",
+ Global = "__global",
+ Missing = "__missing",
+ Type = "__type",
+ Object = "__object",
+ JSXAttributes = "__jsxAttributes",
+ Class = "__class",
+ Function = "__function",
+ Computed = "__computed",
+ Resolving = "__resolving__",
+ ExportEquals = "export=",
+ Default = "default",
+ This = "this"
+ }
+ /**
+ * This represents a string whose leading underscore have been escaped by adding extra leading underscores.
+ * The shape of this brand is rather unique compared to others we've used.
+ * Instead of just an intersection of a string and an object, it is that union-ed
+ * with an intersection of void and an object. This makes it wholly incompatible
+ * with a normal string (which is good, it cannot be misused on assignment or on usage),
+ * while still being comparable with a normal string via === (also good) and castable from a string.
+ */
+ export type __String = (string & {
+ __escapedIdentifier: void;
+ }) | (void & {
+ __escapedIdentifier: void;
+ }) | InternalSymbolName;
+ /** ReadonlyMap where keys are `__String`s. */
+ export interface ReadonlyUnderscoreEscapedMap<T> {
+ get(key: __String): T | undefined;
+ has(key: __String): boolean;
+ forEach(action: (value: T, key: __String) => void): void;
+ readonly size: number;
+ keys(): Iterator<__String>;
+ values(): Iterator<T>;
+ entries(): Iterator<[__String, T]>;
+ }
+ /** Map where keys are `__String`s. */
+ export interface UnderscoreEscapedMap<T> extends ReadonlyUnderscoreEscapedMap<T> {
+ set(key: __String, value: T): this;
+ delete(key: __String): boolean;
+ clear(): void;
+ }
+ /** SymbolTable based on ES6 Map interface. */
+ export type SymbolTable = UnderscoreEscapedMap<Symbol>;
+ export enum TypeFlags {
+ Any = 1,
+ Unknown = 2,
+ String = 4,
+ Number = 8,
+ Boolean = 16,
+ Enum = 32,
+ BigInt = 64,
+ StringLiteral = 128,
+ NumberLiteral = 256,
+ BooleanLiteral = 512,
+ EnumLiteral = 1024,
+ BigIntLiteral = 2048,
+ ESSymbol = 4096,
+ UniqueESSymbol = 8192,
+ Void = 16384,
+ Undefined = 32768,
+ Null = 65536,
+ Never = 131072,
+ TypeParameter = 262144,
+ Object = 524288,
+ Union = 1048576,
+ Intersection = 2097152,
+ Index = 4194304,
+ IndexedAccess = 8388608,
+ Conditional = 16777216,
+ Substitution = 33554432,
+ NonPrimitive = 67108864,
+ Literal = 2944,
+ Unit = 109440,
+ StringOrNumberLiteral = 384,
+ PossiblyFalsy = 117724,
+ StringLike = 132,
+ NumberLike = 296,
+ BigIntLike = 2112,
+ BooleanLike = 528,
+ EnumLike = 1056,
+ ESSymbolLike = 12288,
+ VoidLike = 49152,
+ UnionOrIntersection = 3145728,
+ StructuredType = 3670016,
+ TypeVariable = 8650752,
+ InstantiableNonPrimitive = 58982400,
+ InstantiablePrimitive = 4194304,
+ Instantiable = 63176704,
+ StructuredOrInstantiable = 66846720,
+ Narrowable = 133970943,
+ NotUnionOrUnit = 67637251,
+ }
+ export type DestructuringPattern = BindingPattern | ObjectLiteralExpression | ArrayLiteralExpression;
+ export interface Type {
+ flags: TypeFlags;
+ symbol: Symbol;
+ pattern?: DestructuringPattern;
+ aliasSymbol?: Symbol;
+ aliasTypeArguments?: readonly Type[];
+ }
+ export interface LiteralType extends Type {
+ value: string | number | PseudoBigInt;
+ freshType: LiteralType;
+ regularType: LiteralType;
+ }
+ export interface UniqueESSymbolType extends Type {
+ symbol: Symbol;
+ escapedName: __String;
+ }
+ export interface StringLiteralType extends LiteralType {
+ value: string;
+ }
+ export interface NumberLiteralType extends LiteralType {
+ value: number;
+ }
+ export interface BigIntLiteralType extends LiteralType {
+ value: PseudoBigInt;
+ }
+ export interface EnumType extends Type {
+ }
+ export enum ObjectFlags {
+ Class = 1,
+ Interface = 2,
+ Reference = 4,
+ Tuple = 8,
+ Anonymous = 16,
+ Mapped = 32,
+ Instantiated = 64,
+ ObjectLiteral = 128,
+ EvolvingArray = 256,
+ ObjectLiteralPatternWithComputedProperties = 512,
+ ContainsSpread = 1024,
+ ReverseMapped = 2048,
+ JsxAttributes = 4096,
+ MarkerType = 8192,
+ JSLiteral = 16384,
+ FreshLiteral = 32768,
+ ArrayLiteral = 65536,
+ ObjectRestType = 131072,
+ ClassOrInterface = 3,
+ }
+ export interface ObjectType extends Type {
+ objectFlags: ObjectFlags;
+ }
+ /** Class and interface types (ObjectFlags.Class and ObjectFlags.Interface). */
+ export interface InterfaceType extends ObjectType {
+ typeParameters: TypeParameter[] | undefined;
+ outerTypeParameters: TypeParameter[] | undefined;
+ localTypeParameters: TypeParameter[] | undefined;
+ thisType: TypeParameter | undefined;
+ }
+ export type BaseType = ObjectType | IntersectionType | TypeVariable;
+ export interface InterfaceTypeWithDeclaredMembers extends InterfaceType {
+ declaredProperties: Symbol[];
+ declaredCallSignatures: Signature[];
+ declaredConstructSignatures: Signature[];
+ declaredStringIndexInfo?: IndexInfo;
+ declaredNumberIndexInfo?: IndexInfo;
+ }
+ /**
+ * Type references (ObjectFlags.Reference). When a class or interface has type parameters or
+ * a "this" type, references to the class or interface are made using type references. The
+ * typeArguments property specifies the types to substitute for the type parameters of the
+ * class or interface and optionally includes an extra element that specifies the type to
+ * substitute for "this" in the resulting instantiation. When no extra argument is present,
+ * the type reference itself is substituted for "this". The typeArguments property is undefined
+ * if the class or interface has no type parameters and the reference isn't specifying an
+ * explicit "this" argument.
+ */
+ export interface TypeReference extends ObjectType {
+ target: GenericType;
+ node?: TypeReferenceNode | ArrayTypeNode | TupleTypeNode;
+ }
+ export interface DeferredTypeReference extends TypeReference {
+ }
+ export interface GenericType extends InterfaceType, TypeReference {
+ }
+ export interface TupleType extends GenericType {
+ minLength: number;
+ hasRestElement: boolean;
+ readonly: boolean;
+ associatedNames?: __String[];
+ }
+ export interface TupleTypeReference extends TypeReference {
+ target: TupleType;
+ }
+ export interface UnionOrIntersectionType extends Type {
+ types: Type[];
+ }
+ export interface UnionType extends UnionOrIntersectionType {
+ }
+ export interface IntersectionType extends UnionOrIntersectionType {
+ }
+ export type StructuredType = ObjectType | UnionType | IntersectionType;
+ export interface EvolvingArrayType extends ObjectType {
+ elementType: Type;
+ finalArrayType?: Type;
+ }
+ export interface InstantiableType extends Type {
+ }
+ export interface TypeParameter extends InstantiableType {
+ }
+ export interface IndexedAccessType extends InstantiableType {
+ objectType: Type;
+ indexType: Type;
+ constraint?: Type;
+ simplifiedForReading?: Type;
+ simplifiedForWriting?: Type;
+ }
+ export type TypeVariable = TypeParameter | IndexedAccessType;
+ export interface IndexType extends InstantiableType {
+ type: InstantiableType | UnionOrIntersectionType;
+ }
+ export interface ConditionalRoot {
+ node: ConditionalTypeNode;
+ checkType: Type;
+ extendsType: Type;
+ trueType: Type;
+ falseType: Type;
+ isDistributive: boolean;
+ inferTypeParameters?: TypeParameter[];
+ outerTypeParameters?: TypeParameter[];
+ instantiations?: Map<Type>;
+ aliasSymbol?: Symbol;
+ aliasTypeArguments?: Type[];
+ }
+ export interface ConditionalType extends InstantiableType {
+ root: ConditionalRoot;
+ checkType: Type;
+ extendsType: Type;
+ resolvedTrueType: Type;
+ resolvedFalseType: Type;
+ }
+ export interface SubstitutionType extends InstantiableType {
+ baseType: Type;
+ substitute: Type;
+ }
+ export enum SignatureKind {
+ Call = 0,
+ Construct = 1
+ }
+ export interface Signature {
+ declaration?: SignatureDeclaration | JSDocSignature;
+ typeParameters?: readonly TypeParameter[];
+ parameters: readonly Symbol[];
+ }
+ export enum IndexKind {
+ String = 0,
+ Number = 1
+ }
+ export interface IndexInfo {
+ type: Type;
+ isReadonly: boolean;
+ declaration?: IndexSignatureDeclaration;
+ }
+ export enum InferencePriority {
+ NakedTypeVariable = 1,
+ HomomorphicMappedType = 2,
+ PartialHomomorphicMappedType = 4,
+ MappedTypeConstraint = 8,
+ ContravariantConditional = 16,
+ ReturnType = 32,
+ LiteralKeyof = 64,
+ NoConstraints = 128,
+ AlwaysStrict = 256,
+ MaxValue = 512,
+ PriorityImpliesCombination = 104,
+ Circularity = -1
+ }
+ /** @deprecated Use FileExtensionInfo instead. */
+ export type JsFileExtensionInfo = FileExtensionInfo;
+ export interface FileExtensionInfo {
+ extension: string;
+ isMixedContent: boolean;
+ scriptKind?: ScriptKind;
+ }
+ export interface DiagnosticMessage {
+ key: string;
+ category: DiagnosticCategory;
+ code: number;
+ message: string;
+ reportsUnnecessary?: {};
+ }
+ /**
+ * A linked list of formatted diagnostic messages to be used as part of a multiline message.
+ * It is built from the bottom up, leaving the head to be the "main" diagnostic.
+ * While it seems that DiagnosticMessageChain is structurally similar to DiagnosticMessage,
+ * the difference is that messages are all preformatted in DMC.
+ */
+ export interface DiagnosticMessageChain {
+ messageText: string;
+ category: DiagnosticCategory;
+ code: number;
+ next?: DiagnosticMessageChain[];
+ }
+ export interface Diagnostic extends DiagnosticRelatedInformation {
+ /** May store more in future. For now, this will simply be `true` to indicate when a diagnostic is an unused-identifier diagnostic. */
+ reportsUnnecessary?: {};
+ source?: string;
+ relatedInformation?: DiagnosticRelatedInformation[];
+ }
+ export interface DiagnosticRelatedInformation {
+ category: DiagnosticCategory;
+ code: number;
+ file: SourceFile | undefined;
+ start: number | undefined;
+ length: number | undefined;
+ messageText: string | DiagnosticMessageChain;
+ }
+ export interface DiagnosticWithLocation extends Diagnostic {
+ file: SourceFile;
+ start: number;
+ length: number;
+ }
+ export enum DiagnosticCategory {
+ Warning = 0,
+ Error = 1,
+ Suggestion = 2,
+ Message = 3
+ }
+ export enum ModuleResolutionKind {
+ Classic = 1,
+ NodeJs = 2
+ }
+ export interface PluginImport {
+ name: string;
+ }
+ export interface ProjectReference {
+ /** A normalized path on disk */
+ path: string;
+ /** The path as the user originally wrote it */
+ originalPath?: string;
+ /** True if the output of this reference should be prepended to the output of this project. Only valid for --outFile compilations */
+ prepend?: boolean;
+ /** True if it is intended that this reference form a circularity */
+ circular?: boolean;
+ }
+ export enum WatchFileKind {
+ FixedPollingInterval = 0,
+ PriorityPollingInterval = 1,
+ DynamicPriorityPolling = 2,
+ UseFsEvents = 3,
+ UseFsEventsOnParentDirectory = 4
+ }
+ export enum WatchDirectoryKind {
+ UseFsEvents = 0,
+ FixedPollingInterval = 1,
+ DynamicPriorityPolling = 2
+ }
+ export enum PollingWatchKind {
+ FixedInterval = 0,
+ PriorityInterval = 1,
+ DynamicPriority = 2
+ }
+ export type CompilerOptionsValue = string | number | boolean | (string | number)[] | string[] | MapLike<string[]> | PluginImport[] | ProjectReference[] | null | undefined;
+ export interface CompilerOptions {
+ allowJs?: boolean;
+ allowSyntheticDefaultImports?: boolean;
+ allowUmdGlobalAccess?: boolean;
+ allowUnreachableCode?: boolean;
+ allowUnusedLabels?: boolean;
+ alwaysStrict?: boolean;
+ baseUrl?: string;
+ charset?: string;
+ checkJs?: boolean;
+ declaration?: boolean;
+ declarationMap?: boolean;
+ emitDeclarationOnly?: boolean;
+ declarationDir?: string;
+ disableSizeLimit?: boolean;
+ disableSourceOfProjectReferenceRedirect?: boolean;
+ disableSolutionSearching?: boolean;
+ downlevelIteration?: boolean;
+ emitBOM?: boolean;
+ emitDecoratorMetadata?: boolean;
+ experimentalDecorators?: boolean;
+ forceConsistentCasingInFileNames?: boolean;
+ importHelpers?: boolean;
+ importsNotUsedAsValues?: ImportsNotUsedAsValues;
+ inlineSourceMap?: boolean;
+ inlineSources?: boolean;
+ isolatedModules?: boolean;
+ jsx?: JsxEmit;
+ keyofStringsOnly?: boolean;
+ lib?: string[];
+ locale?: string;
+ mapRoot?: string;
+ maxNodeModuleJsDepth?: number;
+ module?: ModuleKind;
+ moduleResolution?: ModuleResolutionKind;
+ newLine?: NewLineKind;
+ noEmit?: boolean;
+ noEmitHelpers?: boolean;
+ noEmitOnError?: boolean;
+ noErrorTruncation?: boolean;
+ noFallthroughCasesInSwitch?: boolean;
+ noImplicitAny?: boolean;
+ noImplicitReturns?: boolean;
+ noImplicitThis?: boolean;
+ noStrictGenericChecks?: boolean;
+ noUnusedLocals?: boolean;
+ noUnusedParameters?: boolean;
+ noImplicitUseStrict?: boolean;
+ assumeChangesOnlyAffectDirectDependencies?: boolean;
+ noLib?: boolean;
+ noResolve?: boolean;
+ out?: string;
+ outDir?: string;
+ outFile?: string;
+ paths?: MapLike<string[]>;
+ preserveConstEnums?: boolean;
+ preserveSymlinks?: boolean;
+ project?: string;
+ reactNamespace?: string;
+ jsxFactory?: string;
+ composite?: boolean;
+ incremental?: boolean;
+ tsBuildInfoFile?: string;
+ removeComments?: boolean;
+ rootDir?: string;
+ rootDirs?: string[];
+ skipLibCheck?: boolean;
+ skipDefaultLibCheck?: boolean;
+ sourceMap?: boolean;
+ sourceRoot?: string;
+ strict?: boolean;
+ strictFunctionTypes?: boolean;
+ strictBindCallApply?: boolean;
+ strictNullChecks?: boolean;
+ strictPropertyInitialization?: boolean;
+ stripInternal?: boolean;
+ suppressExcessPropertyErrors?: boolean;
+ suppressImplicitAnyIndexErrors?: boolean;
+ target?: ScriptTarget;
+ traceResolution?: boolean;
+ resolveJsonModule?: boolean;
+ types?: string[];
+ /** Paths used to compute primary types search locations */
+ typeRoots?: string[];
+ esModuleInterop?: boolean;
+ useDefineForClassFields?: boolean;
+ [option: string]: CompilerOptionsValue | TsConfigSourceFile | undefined;
+ }
+ export interface WatchOptions {
+ watchFile?: WatchFileKind;
+ watchDirectory?: WatchDirectoryKind;
+ fallbackPolling?: PollingWatchKind;
+ synchronousWatchDirectory?: boolean;
+ [option: string]: CompilerOptionsValue | undefined;
+ }
+ export interface TypeAcquisition {
+ /**
+ * @deprecated typingOptions.enableAutoDiscovery
+ * Use typeAcquisition.enable instead.
+ */
+ enableAutoDiscovery?: boolean;
+ enable?: boolean;
+ include?: string[];
+ exclude?: string[];
+ [option: string]: string[] | boolean | undefined;
+ }
+ export enum ModuleKind {
+ None = 0,
+ CommonJS = 1,
+ AMD = 2,
+ UMD = 3,
+ System = 4,
+ ES2015 = 5,
+ ES2020 = 6,
+ ESNext = 99
+ }
+ export enum JsxEmit {
+ None = 0,
+ Preserve = 1,
+ React = 2,
+ ReactNative = 3
+ }
+ export enum ImportsNotUsedAsValues {
+ Remove = 0,
+ Preserve = 1,
+ Error = 2
+ }
+ export enum NewLineKind {
+ CarriageReturnLineFeed = 0,
+ LineFeed = 1
+ }
+ export interface LineAndCharacter {
+ /** 0-based. */
+ line: number;
+ character: number;
+ }
+ export enum ScriptKind {
+ Unknown = 0,
+ JS = 1,
+ JSX = 2,
+ TS = 3,
+ TSX = 4,
+ External = 5,
+ JSON = 6,
+ /**
+ * Used on extensions that doesn't define the ScriptKind but the content defines it.
+ * Deferred extensions are going to be included in all project contexts.
+ */
+ Deferred = 7
+ }
+ export enum ScriptTarget {
+ ES3 = 0,
+ ES5 = 1,
+ ES2015 = 2,
+ ES2016 = 3,
+ ES2017 = 4,
+ ES2018 = 5,
+ ES2019 = 6,
+ ES2020 = 7,
+ ESNext = 99,
+ JSON = 100,
+ Latest = 99
+ }
+ export enum LanguageVariant {
+ Standard = 0,
+ JSX = 1
+ }
+ /** Either a parsed command line or a parsed tsconfig.json */
+ export interface ParsedCommandLine {
+ options: CompilerOptions;
+ typeAcquisition?: TypeAcquisition;
+ fileNames: string[];
+ projectReferences?: readonly ProjectReference[];
+ watchOptions?: WatchOptions;
+ raw?: any;
+ errors: Diagnostic[];
+ wildcardDirectories?: MapLike<WatchDirectoryFlags>;
+ compileOnSave?: boolean;
+ }
+ export enum WatchDirectoryFlags {
+ None = 0,
+ Recursive = 1
+ }
+ export interface ExpandResult {
+ fileNames: string[];
+ wildcardDirectories: MapLike<WatchDirectoryFlags>;
+ }
+ export interface CreateProgramOptions {
+ rootNames: readonly string[];
+ options: CompilerOptions;
+ projectReferences?: readonly ProjectReference[];
+ host?: CompilerHost;
+ oldProgram?: Program;
+ configFileParsingDiagnostics?: readonly Diagnostic[];
+ }
+ export interface ModuleResolutionHost {
+ fileExists(fileName: string): boolean;
+ readFile(fileName: string): string | undefined;
+ trace?(s: string): void;
+ directoryExists?(directoryName: string): boolean;
+ /**
+ * Resolve a symbolic link.
+ * @see https://nodejs.org/api/fs.html#fs_fs_realpathsync_path_options
+ */
+ realpath?(path: string): string;
+ getCurrentDirectory?(): string;
+ getDirectories?(path: string): string[];
+ }
+ /**
+ * Represents the result of module resolution.
+ * Module resolution will pick up tsx/jsx/js files even if '--jsx' and '--allowJs' are turned off.
+ * The Program will then filter results based on these flags.
+ *
+ * Prefer to return a `ResolvedModuleFull` so that the file type does not have to be inferred.
+ */
+ export interface ResolvedModule {
+ /** Path of the file the module was resolved to. */
+ resolvedFileName: string;
+ /** True if `resolvedFileName` comes from `node_modules`. */
+ isExternalLibraryImport?: boolean;
+ }
+ /**
+ * ResolvedModule with an explicitly provided `extension` property.
+ * Prefer this over `ResolvedModule`.
+ * If changing this, remember to change `moduleResolutionIsEqualTo`.
+ */
+ export interface ResolvedModuleFull extends ResolvedModule {
+ /**
+ * Extension of resolvedFileName. This must match what's at the end of resolvedFileName.
+ * This is optional for backwards-compatibility, but will be added if not provided.
+ */
+ extension: Extension;
+ packageId?: PackageId;
+ }
+ /**
+ * Unique identifier with a package name and version.
+ * If changing this, remember to change `packageIdIsEqual`.
+ */
+ export interface PackageId {
+ /**
+ * Name of the package.
+ * Should not include `@types`.
+ * If accessing a non-index file, this should include its name e.g. "foo/bar".
+ */
+ name: string;
+ /**
+ * Name of a submodule within this package.
+ * May be "".
+ */
+ subModuleName: string;
+ /** Version of the package, e.g. "1.2.3" */
+ version: string;
+ }
+ export enum Extension {
+ Ts = ".ts",
+ Tsx = ".tsx",
+ Dts = ".d.ts",
+ Js = ".js",
+ Jsx = ".jsx",
+ Json = ".json",
+ TsBuildInfo = ".tsbuildinfo"
+ }
+ export interface ResolvedModuleWithFailedLookupLocations {
+ readonly resolvedModule: ResolvedModuleFull | undefined;
+ }
+ export interface ResolvedTypeReferenceDirective {
+ primary: boolean;
+ resolvedFileName: string | undefined;
+ packageId?: PackageId;
+ /** True if `resolvedFileName` comes from `node_modules`. */
+ isExternalLibraryImport?: boolean;
+ }
+ export interface ResolvedTypeReferenceDirectiveWithFailedLookupLocations {
+ readonly resolvedTypeReferenceDirective: ResolvedTypeReferenceDirective | undefined;
+ readonly failedLookupLocations: string[];
+ }
+ export interface CompilerHost extends ModuleResolutionHost {
+ getSourceFile(fileName: string, languageVersion: ScriptTarget, onError?: (message: string) => void, shouldCreateNewSourceFile?: boolean): SourceFile | undefined;
+ getSourceFileByPath?(fileName: string, path: Path, languageVersion: ScriptTarget, onError?: (message: string) => void, shouldCreateNewSourceFile?: boolean): SourceFile | undefined;
+ getCancellationToken?(): CancellationToken;
+ getDefaultLibFileName(options: CompilerOptions): string;
+ getDefaultLibLocation?(): string;
+ writeFile: WriteFileCallback;
+ getCurrentDirectory(): string;
+ getCanonicalFileName(fileName: string): string;
+ useCaseSensitiveFileNames(): boolean;
+ getNewLine(): string;
+ readDirectory?(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[], depth?: number): string[];
+ resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions): (ResolvedModule | undefined)[];
+ /**
+ * This method is a companion for 'resolveModuleNames' and is used to resolve 'types' references to actual type declaration files
+ */
+ resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions): (ResolvedTypeReferenceDirective | undefined)[];
+ getEnvironmentVariable?(name: string): string | undefined;
+ createHash?(data: string): string;
+ getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined;
+ }
+ export interface SourceMapRange extends TextRange {
+ source?: SourceMapSource;
+ }
+ export interface SourceMapSource {
+ fileName: string;
+ text: string;
+ skipTrivia?: (pos: number) => number;
+ }
+ export enum EmitFlags {
+ None = 0,
+ SingleLine = 1,
+ AdviseOnEmitNode = 2,
+ NoSubstitution = 4,
+ CapturesThis = 8,
+ NoLeadingSourceMap = 16,
+ NoTrailingSourceMap = 32,
+ NoSourceMap = 48,
+ NoNestedSourceMaps = 64,
+ NoTokenLeadingSourceMaps = 128,
+ NoTokenTrailingSourceMaps = 256,
+ NoTokenSourceMaps = 384,
+ NoLeadingComments = 512,
+ NoTrailingComments = 1024,
+ NoComments = 1536,
+ NoNestedComments = 2048,
+ HelperName = 4096,
+ ExportName = 8192,
+ LocalName = 16384,
+ InternalName = 32768,
+ Indented = 65536,
+ NoIndentation = 131072,
+ AsyncFunctionBody = 262144,
+ ReuseTempVariableScope = 524288,
+ CustomPrologue = 1048576,
+ NoHoisting = 2097152,
+ HasEndOfDeclarationMarker = 4194304,
+ Iterator = 8388608,
+ NoAsciiEscaping = 16777216,
+ }
+ export interface EmitHelper {
+ readonly name: string;
+ readonly scoped: boolean;
+ readonly text: string | ((node: EmitHelperUniqueNameCallback) => string);
+ readonly priority?: number;
+ readonly dependencies?: EmitHelper[];
+ }
+ export interface UnscopedEmitHelper extends EmitHelper {
+ readonly scoped: false;
+ readonly text: string;
+ }
+ export type EmitHelperUniqueNameCallback = (name: string) => string;
+ export enum EmitHint {
+ SourceFile = 0,
+ Expression = 1,
+ IdentifierName = 2,
+ MappedTypeParameter = 3,
+ Unspecified = 4,
+ EmbeddedStatement = 5,
+ JsxAttributeValue = 6
+ }
+ export interface TransformationContext {
+ /** Gets the compiler options supplied to the transformer. */
+ getCompilerOptions(): CompilerOptions;
+ /** Starts a new lexical environment. */
+ startLexicalEnvironment(): void;
+ /** Suspends the current lexical environment, usually after visiting a parameter list. */
+ suspendLexicalEnvironment(): void;
+ /** Resumes a suspended lexical environment, usually before visiting a function body. */
+ resumeLexicalEnvironment(): void;
+ /** Ends a lexical environment, returning any declarations. */
+ endLexicalEnvironment(): Statement[] | undefined;
+ /** Hoists a function declaration to the containing scope. */
+ hoistFunctionDeclaration(node: FunctionDeclaration): void;
+ /** Hoists a variable declaration to the containing scope. */
+ hoistVariableDeclaration(node: Identifier): void;
+ /** Records a request for a non-scoped emit helper in the current context. */
+ requestEmitHelper(helper: EmitHelper): void;
+ /** Gets and resets the requested non-scoped emit helpers. */
+ readEmitHelpers(): EmitHelper[] | undefined;
+ /** Enables expression substitutions in the pretty printer for the provided SyntaxKind. */
+ enableSubstitution(kind: SyntaxKind): void;
+ /** Determines whether expression substitutions are enabled for the provided node. */
+ isSubstitutionEnabled(node: Node): boolean;
+ /**
+ * Hook used by transformers to substitute expressions just before they
+ * are emitted by the pretty printer.
+ *
+ * NOTE: Transformation hooks should only be modified during `Transformer` initialization,
+ * before returning the `NodeTransformer` callback.
+ */
+ onSubstituteNode: (hint: EmitHint, node: Node) => Node;
+ /**
+ * Enables before/after emit notifications in the pretty printer for the provided
+ * SyntaxKind.
+ */
+ enableEmitNotification(kind: SyntaxKind): void;
+ /**
+ * Determines whether before/after emit notifications should be raised in the pretty
+ * printer when it emits a node.
+ */
+ isEmitNotificationEnabled(node: Node): boolean;
+ /**
+ * Hook used to allow transformers to capture state before or after
+ * the printer emits a node.
+ *
+ * NOTE: Transformation hooks should only be modified during `Transformer` initialization,
+ * before returning the `NodeTransformer` callback.
+ */
+ onEmitNode: (hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void) => void;
+ }
+ export interface TransformationResult<T extends Node> {
+ /** Gets the transformed source files. */
+ transformed: T[];
+ /** Gets diagnostics for the transformation. */
+ diagnostics?: DiagnosticWithLocation[];
+ /**
+ * Gets a substitute for a node, if one is available; otherwise, returns the original node.
+ *
+ * @param hint A hint as to the intended usage of the node.
+ * @param node The node to substitute.
+ */
+ substituteNode(hint: EmitHint, node: Node): Node;
+ /**
+ * Emits a node with possible notification.
+ *
+ * @param hint A hint as to the intended usage of the node.
+ * @param node The node to emit.
+ * @param emitCallback A callback used to emit the node.
+ */
+ emitNodeWithNotification(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void): void;
+ /**
+ * Indicates if a given node needs an emit notification
+ *
+ * @param node The node to emit.
+ */
+ isEmitNotificationEnabled?(node: Node): boolean;
+ /**
+ * Clean up EmitNode entries on any parse-tree nodes.
+ */
+ dispose(): void;
+ }
+ /**
+ * A function that is used to initialize and return a `Transformer` callback, which in turn
+ * will be used to transform one or more nodes.
+ */
+ export type TransformerFactory<T extends Node> = (context: TransformationContext) => Transformer<T>;
+ /**
+ * A function that transforms a node.
+ */
+ export type Transformer<T extends Node> = (node: T) => T;
+ /**
+ * A function that accepts and possibly transforms a node.
+ */
+ export type Visitor = (node: Node) => VisitResult<Node>;
+ export type VisitResult<T extends Node> = T | T[] | undefined;
+ export interface Printer {
+ /**
+ * Print a node and its subtree as-is, without any emit transformations.
+ * @param hint A value indicating the purpose of a node. This is primarily used to
+ * distinguish between an `Identifier` used in an expression position, versus an
+ * `Identifier` used as an `IdentifierName` as part of a declaration. For most nodes you
+ * should just pass `Unspecified`.
+ * @param node The node to print. The node and its subtree are printed as-is, without any
+ * emit transformations.
+ * @param sourceFile A source file that provides context for the node. The source text of
+ * the file is used to emit the original source content for literals and identifiers, while
+ * the identifiers of the source file are used when generating unique names to avoid
+ * collisions.
+ */
+ printNode(hint: EmitHint, node: Node, sourceFile: SourceFile): string;
+ /**
+ * Prints a list of nodes using the given format flags
+ */
+ printList<T extends Node>(format: ListFormat, list: NodeArray<T>, sourceFile: SourceFile): string;
+ /**
+ * Prints a source file as-is, without any emit transformations.
+ */
+ printFile(sourceFile: SourceFile): string;
+ /**
+ * Prints a bundle of source files as-is, without any emit transformations.
+ */
+ printBundle(bundle: Bundle): string;
+ }
+ export interface PrintHandlers {
+ /**
+ * A hook used by the Printer when generating unique names to avoid collisions with
+ * globally defined names that exist outside of the current source file.
+ */
+ hasGlobalName?(name: string): boolean;
+ /**
+ * A hook used by the Printer to provide notifications prior to emitting a node. A
+ * compatible implementation **must** invoke `emitCallback` with the provided `hint` and
+ * `node` values.
+ * @param hint A hint indicating the intended purpose of the node.
+ * @param node The node to emit.
+ * @param emitCallback A callback that, when invoked, will emit the node.
+ * @example
+ * ```ts
+ * var printer = createPrinter(printerOptions, {
+ * onEmitNode(hint, node, emitCallback) {
+ * // set up or track state prior to emitting the node...
+ * emitCallback(hint, node);
+ * // restore state after emitting the node...
+ * }
+ * });
+ * ```
+ */
+ onEmitNode?(hint: EmitHint, node: Node | undefined, emitCallback: (hint: EmitHint, node: Node | undefined) => void): void;
+ /**
+ * A hook used to check if an emit notification is required for a node.
+ * @param node The node to emit.
+ */
+ isEmitNotificationEnabled?(node: Node | undefined): boolean;
+ /**
+ * A hook used by the Printer to perform just-in-time substitution of a node. This is
+ * primarily used by node transformations that need to substitute one node for another,
+ * such as replacing `myExportedVar` with `exports.myExportedVar`.
+ * @param hint A hint indicating the intended purpose of the node.
+ * @param node The node to emit.
+ * @example
+ * ```ts
+ * var printer = createPrinter(printerOptions, {
+ * substituteNode(hint, node) {
+ * // perform substitution if necessary...
+ * return node;
+ * }
+ * });
+ * ```
+ */
+ substituteNode?(hint: EmitHint, node: Node): Node;
+ }
+ export interface PrinterOptions {
+ removeComments?: boolean;
+ newLine?: NewLineKind;
+ omitTrailingSemicolon?: boolean;
+ noEmitHelpers?: boolean;
+ }
+ export interface GetEffectiveTypeRootsHost {
+ directoryExists?(directoryName: string): boolean;
+ getCurrentDirectory?(): string;
+ }
+ export interface TextSpan {
+ start: number;
+ length: number;
+ }
+ export interface TextChangeRange {
+ span: TextSpan;
+ newLength: number;
+ }
+ export interface SyntaxList extends Node {
+ _children: Node[];
+ }
+ export enum ListFormat {
+ None = 0,
+ SingleLine = 0,
+ MultiLine = 1,
+ PreserveLines = 2,
+ LinesMask = 3,
+ NotDelimited = 0,
+ BarDelimited = 4,
+ AmpersandDelimited = 8,
+ CommaDelimited = 16,
+ AsteriskDelimited = 32,
+ DelimitersMask = 60,
+ AllowTrailingComma = 64,
+ Indented = 128,
+ SpaceBetweenBraces = 256,
+ SpaceBetweenSiblings = 512,
+ Braces = 1024,
+ Parenthesis = 2048,
+ AngleBrackets = 4096,
+ SquareBrackets = 8192,
+ BracketsMask = 15360,
+ OptionalIfUndefined = 16384,
+ OptionalIfEmpty = 32768,
+ Optional = 49152,
+ PreferNewLine = 65536,
+ NoTrailingNewLine = 131072,
+ NoInterveningComments = 262144,
+ NoSpaceIfEmpty = 524288,
+ SingleElement = 1048576,
+ SpaceAfterList = 2097152,
+ Modifiers = 262656,
+ HeritageClauses = 512,
+ SingleLineTypeLiteralMembers = 768,
+ MultiLineTypeLiteralMembers = 32897,
+ TupleTypeElements = 528,
+ UnionTypeConstituents = 516,
+ IntersectionTypeConstituents = 520,
+ ObjectBindingPatternElements = 525136,
+ ArrayBindingPatternElements = 524880,
+ ObjectLiteralExpressionProperties = 526226,
+ ArrayLiteralExpressionElements = 8914,
+ CommaListElements = 528,
+ CallExpressionArguments = 2576,
+ NewExpressionArguments = 18960,
+ TemplateExpressionSpans = 262144,
+ SingleLineBlockStatements = 768,
+ MultiLineBlockStatements = 129,
+ VariableDeclarationList = 528,
+ SingleLineFunctionBodyStatements = 768,
+ MultiLineFunctionBodyStatements = 1,
+ ClassHeritageClauses = 0,
+ ClassMembers = 129,
+ InterfaceMembers = 129,
+ EnumMembers = 145,
+ CaseBlockClauses = 129,
+ NamedImportsOrExportsElements = 525136,
+ JsxElementOrFragmentChildren = 262144,
+ JsxElementAttributes = 262656,
+ CaseOrDefaultClauseStatements = 163969,
+ HeritageClauseTypes = 528,
+ SourceFileStatements = 131073,
+ Decorators = 2146305,
+ TypeArguments = 53776,
+ TypeParameters = 53776,
+ Parameters = 2576,
+ IndexSignatureParameters = 8848,
+ JSDocComment = 33
+ }
+ export interface UserPreferences {
+ readonly disableSuggestions?: boolean;
+ readonly quotePreference?: "auto" | "double" | "single";
+ readonly includeCompletionsForModuleExports?: boolean;
+ readonly includeAutomaticOptionalChainCompletions?: boolean;
+ readonly includeCompletionsWithInsertText?: boolean;
+ readonly importModuleSpecifierPreference?: "auto" | "relative" | "non-relative";
+ /** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */
+ readonly importModuleSpecifierEnding?: "auto" | "minimal" | "index" | "js";
+ readonly allowTextChangesInNewFiles?: boolean;
+ readonly providePrefixAndSuffixTextForRename?: boolean;
+ }
+ /** Represents a bigint literal value without requiring bigint support */
+ export interface PseudoBigInt {
+ negative: boolean;
+ base10Value: string;
+ }
+ export {};
+}
+declare function setTimeout(handler: (...args: any[]) => void, timeout: number): any;
+declare function clearTimeout(handle: any): void;
+declare namespace ts {
+ export enum FileWatcherEventKind {
+ Created = 0,
+ Changed = 1,
+ Deleted = 2
+ }
+ export type FileWatcherCallback = (fileName: string, eventKind: FileWatcherEventKind) => void;
+ export type DirectoryWatcherCallback = (fileName: string) => void;
+ export interface System {
+ args: string[];
+ newLine: string;
+ useCaseSensitiveFileNames: boolean;
+ write(s: string): void;
+ writeOutputIsTTY?(): boolean;
+ readFile(path: string, encoding?: string): string | undefined;
+ getFileSize?(path: string): number;
+ writeFile(path: string, data: string, writeByteOrderMark?: boolean): void;
+ /**
+ * @pollingInterval - this parameter is used in polling-based watchers and ignored in watchers that
+ * use native OS file watching
+ */
+ watchFile?(path: string, callback: FileWatcherCallback, pollingInterval?: number, options?: WatchOptions): FileWatcher;
+ watchDirectory?(path: string, callback: DirectoryWatcherCallback, recursive?: boolean, options?: WatchOptions): FileWatcher;
+ resolvePath(path: string): string;
+ fileExists(path: string): boolean;
+ directoryExists(path: string): boolean;
+ createDirectory(path: string): void;
+ getExecutingFilePath(): string;
+ getCurrentDirectory(): string;
+ getDirectories(path: string): string[];
+ readDirectory(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[];
+ getModifiedTime?(path: string): Date | undefined;
+ setModifiedTime?(path: string, time: Date): void;
+ deleteFile?(path: string): void;
+ /**
+ * A good implementation is node.js' `crypto.createHash`. (https://nodejs.org/api/crypto.html#crypto_crypto_createhash_algorithm)
+ */
+ createHash?(data: string): string;
+ /** This must be cryptographically secure. Only implement this method using `crypto.createHash("sha256")`. */
+ createSHA256Hash?(data: string): string;
+ getMemoryUsage?(): number;
+ exit(exitCode?: number): void;
+ realpath?(path: string): string;
+ setTimeout?(callback: (...args: any[]) => void, ms: number, ...args: any[]): any;
+ clearTimeout?(timeoutId: any): void;
+ clearScreen?(): void;
+ base64decode?(input: string): string;
+ base64encode?(input: string): string;
+ }
+ export interface FileWatcher {
+ close(): void;
+ }
+ export function getNodeMajorVersion(): number | undefined;
+ export let sys: System;
+ export {};
+}
+declare namespace ts {
+ type ErrorCallback = (message: DiagnosticMessage, length: number) => void;
+ interface Scanner {
+ getStartPos(): number;
+ getToken(): SyntaxKind;
+ getTextPos(): number;
+ getTokenPos(): number;
+ getTokenText(): string;
+ getTokenValue(): string;
+ hasUnicodeEscape(): boolean;
+ hasExtendedUnicodeEscape(): boolean;
+ hasPrecedingLineBreak(): boolean;
+ isIdentifier(): boolean;
+ isReservedWord(): boolean;
+ isUnterminated(): boolean;
+ reScanGreaterToken(): SyntaxKind;
+ reScanSlashToken(): SyntaxKind;
+ reScanTemplateToken(isTaggedTemplate: boolean): SyntaxKind;
+ reScanTemplateHeadOrNoSubstitutionTemplate(): SyntaxKind;
+ scanJsxIdentifier(): SyntaxKind;
+ scanJsxAttributeValue(): SyntaxKind;
+ reScanJsxAttributeValue(): SyntaxKind;
+ reScanJsxToken(): JsxTokenSyntaxKind;
+ reScanLessThanToken(): SyntaxKind;
+ reScanQuestionToken(): SyntaxKind;
+ scanJsxToken(): JsxTokenSyntaxKind;
+ scanJsDocToken(): JSDocSyntaxKind;
+ scan(): SyntaxKind;
+ getText(): string;
+ setText(text: string | undefined, start?: number, length?: number): void;
+ setOnError(onError: ErrorCallback | undefined): void;
+ setScriptTarget(scriptTarget: ScriptTarget): void;
+ setLanguageVariant(variant: LanguageVariant): void;
+ setTextPos(textPos: number): void;
+ lookAhead<T>(callback: () => T): T;
+ scanRange<T>(start: number, length: number, callback: () => T): T;
+ tryScan<T>(callback: () => T): T;
+ }
+ function tokenToString(t: SyntaxKind): string | undefined;
+ function getPositionOfLineAndCharacter(sourceFile: SourceFileLike, line: number, character: number): number;
+ function getLineAndCharacterOfPosition(sourceFile: SourceFileLike, position: number): LineAndCharacter;
+ function isWhiteSpaceLike(ch: number): boolean;
+ /** Does not include line breaks. For that, see isWhiteSpaceLike. */
+ function isWhiteSpaceSingleLine(ch: number): boolean;
+ function isLineBreak(ch: number): boolean;
+ function couldStartTrivia(text: string, pos: number): boolean;
+ function forEachLeadingCommentRange<U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean) => U): U | undefined;
+ function forEachLeadingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state: T): U | undefined;
+ function forEachTrailingCommentRange<U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean) => U): U | undefined;
+ function forEachTrailingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T) => U, state: T): U | undefined;
+ function reduceEachLeadingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T, memo: U) => U, state: T, initial: U): U | undefined;
+ function reduceEachTrailingCommentRange<T, U>(text: string, pos: number, cb: (pos: number, end: number, kind: CommentKind, hasTrailingNewLine: boolean, state: T, memo: U) => U, state: T, initial: U): U | undefined;
+ function getLeadingCommentRanges(text: string, pos: number): CommentRange[] | undefined;
+ function getTrailingCommentRanges(text: string, pos: number): CommentRange[] | undefined;
+ /** Optionally, get the shebang */
+ function getShebang(text: string): string | undefined;
+ function isIdentifierStart(ch: number, languageVersion: ScriptTarget | undefined): boolean;
+ function isIdentifierPart(ch: number, languageVersion: ScriptTarget | undefined, identifierVariant?: LanguageVariant): boolean;
+ function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, languageVariant?: LanguageVariant, textInitial?: string, onError?: ErrorCallback, start?: number, length?: number): Scanner;
+}
+declare namespace ts {
+ function isExternalModuleNameRelative(moduleName: string): boolean;
+ function sortAndDeduplicateDiagnostics<T extends Diagnostic>(diagnostics: readonly T[]): SortedReadonlyArray<T>;
+ function getDefaultLibFileName(options: CompilerOptions): string;
+ function textSpanEnd(span: TextSpan): number;
+ function textSpanIsEmpty(span: TextSpan): boolean;
+ function textSpanContainsPosition(span: TextSpan, position: number): boolean;
+ function textSpanContainsTextSpan(span: TextSpan, other: TextSpan): boolean;
+ function textSpanOverlapsWith(span: TextSpan, other: TextSpan): boolean;
+ function textSpanOverlap(span1: TextSpan, span2: TextSpan): TextSpan | undefined;
+ function textSpanIntersectsWithTextSpan(span: TextSpan, other: TextSpan): boolean;
+ function textSpanIntersectsWith(span: TextSpan, start: number, length: number): boolean;
+ function decodedTextSpanIntersectsWith(start1: number, length1: number, start2: number, length2: number): boolean;
+ function textSpanIntersectsWithPosition(span: TextSpan, position: number): boolean;
+ function textSpanIntersection(span1: TextSpan, span2: TextSpan): TextSpan | undefined;
+ function createTextSpan(start: number, length: number): TextSpan;
+ function createTextSpanFromBounds(start: number, end: number): TextSpan;
+ function textChangeRangeNewSpan(range: TextChangeRange): TextSpan;
+ function textChangeRangeIsUnchanged(range: TextChangeRange): boolean;
+ function createTextChangeRange(span: TextSpan, newLength: number): TextChangeRange;
+ let unchangedTextChangeRange: TextChangeRange;
+ /**
+ * Called to merge all the changes that occurred across several versions of a script snapshot
+ * into a single change. i.e. if a user keeps making successive edits to a script we will
+ * have a text change from V1 to V2, V2 to V3, ..., Vn.
+ *
+ * This function will then merge those changes into a single change range valid between V1 and
+ * Vn.
+ */
+ function collapseTextChangeRangesAcrossMultipleVersions(changes: readonly TextChangeRange[]): TextChangeRange;
+ function getTypeParameterOwner(d: Declaration): Declaration | undefined;
+ type ParameterPropertyDeclaration = ParameterDeclaration & {
+ parent: ConstructorDeclaration;
+ name: Identifier;
+ };
+ function isParameterPropertyDeclaration(node: Node, parent: Node): node is ParameterPropertyDeclaration;
+ function isEmptyBindingPattern(node: BindingName): node is BindingPattern;
+ function isEmptyBindingElement(node: BindingElement): boolean;
+ function walkUpBindingElementsAndPatterns(binding: BindingElement): VariableDeclaration | ParameterDeclaration;
+ function getCombinedModifierFlags(node: Declaration): ModifierFlags;
+ function getCombinedNodeFlags(node: Node): NodeFlags;
+ /**
+ * Checks to see if the locale is in the appropriate format,
+ * and if it is, attempts to set the appropriate language.
+ */
+ function validateLocaleAndSetLanguage(locale: string, sys: {
+ getExecutingFilePath(): string;
+ resolvePath(path: string): string;
+ fileExists(fileName: string): boolean;
+ readFile(fileName: string): string | undefined;
+ }, errors?: Push<Diagnostic>): void;
+ function getOriginalNode(node: Node): Node;
+ function getOriginalNode<T extends Node>(node: Node, nodeTest: (node: Node) => node is T): T;
+ function getOriginalNode(node: Node | undefined): Node | undefined;
+ function getOriginalNode<T extends Node>(node: Node | undefined, nodeTest: (node: Node | undefined) => node is T): T | undefined;
+ /**
+ * Gets a value indicating whether a node originated in the parse tree.
+ *
+ * @param node The node to test.
+ */
+ function isParseTreeNode(node: Node): boolean;
+ /**
+ * Gets the original parse tree node for a node.
+ *
+ * @param node The original node.
+ * @returns The original parse tree node if found; otherwise, undefined.
+ */
+ function getParseTreeNode(node: Node): Node;
+ /**
+ * Gets the original parse tree node for a node.
+ *
+ * @param node The original node.
+ * @param nodeTest A callback used to ensure the correct type of parse tree node is returned.
+ * @returns The original parse tree node if found; otherwise, undefined.
+ */
+ function getParseTreeNode<T extends Node>(node: Node | undefined, nodeTest?: (node: Node) => node is T): T | undefined;
+ /** Add an extra underscore to identifiers that start with two underscores to avoid issues with magic names like '__proto__' */
+ function escapeLeadingUnderscores(identifier: string): __String;
+ /**
+ * Remove extra underscore from escaped identifier text content.
+ *
+ * @param identifier The escaped identifier text.
+ * @returns The unescaped identifier text.
+ */
+ function unescapeLeadingUnderscores(identifier: __String): string;
+ function idText(identifierOrPrivateName: Identifier | PrivateIdentifier): string;
+ function symbolName(symbol: Symbol): string;
+ function getNameOfJSDocTypedef(declaration: JSDocTypedefTag): Identifier | PrivateIdentifier | undefined;
+ function getNameOfDeclaration(declaration: Declaration | Expression): DeclarationName | undefined;
+ /**
+ * Gets the JSDoc parameter tags for the node if present.
+ *
+ * @remarks Returns any JSDoc param tag whose name matches the provided
+ * parameter, whether a param tag on a containing function
+ * expression, or a param tag on a variable declaration whose
+ * initializer is the containing function. The tags closest to the
+ * node are returned first, so in the previous example, the param
+ * tag on the containing function expression would be first.
+ *
+ * For binding patterns, parameter tags are matched by position.
+ */
+ function getJSDocParameterTags(param: ParameterDeclaration): readonly JSDocParameterTag[];
+ /**
+ * Gets the JSDoc type parameter tags for the node if present.
+ *
+ * @remarks Returns any JSDoc template tag whose names match the provided
+ * parameter, whether a template tag on a containing function
+ * expression, or a template tag on a variable declaration whose
+ * initializer is the containing function. The tags closest to the
+ * node are returned first, so in the previous example, the template
+ * tag on the containing function expression would be first.
+ */
+ function getJSDocTypeParameterTags(param: TypeParameterDeclaration): readonly JSDocTemplateTag[];
+ /**
+ * Return true if the node has JSDoc parameter tags.
+ *
+ * @remarks Includes parameter tags that are not directly on the node,
+ * for example on a variable declaration whose initializer is a function expression.
+ */
+ function hasJSDocParameterTags(node: FunctionLikeDeclaration | SignatureDeclaration): boolean;
+ /** Gets the JSDoc augments tag for the node if present */
+ function getJSDocAugmentsTag(node: Node): JSDocAugmentsTag | undefined;
+ /** Gets the JSDoc implements tags for the node if present */
+ function getJSDocImplementsTags(node: Node): readonly JSDocImplementsTag[];
+ /** Gets the JSDoc class tag for the node if present */
+ function getJSDocClassTag(node: Node): JSDocClassTag | undefined;
+ /** Gets the JSDoc public tag for the node if present */
+ function getJSDocPublicTag(node: Node): JSDocPublicTag | undefined;
+ /** Gets the JSDoc private tag for the node if present */
+ function getJSDocPrivateTag(node: Node): JSDocPrivateTag | undefined;
+ /** Gets the JSDoc protected tag for the node if present */
+ function getJSDocProtectedTag(node: Node): JSDocProtectedTag | undefined;
+ /** Gets the JSDoc protected tag for the node if present */
+ function getJSDocReadonlyTag(node: Node): JSDocReadonlyTag | undefined;
+ /** Gets the JSDoc enum tag for the node if present */
+ function getJSDocEnumTag(node: Node): JSDocEnumTag | undefined;
+ /** Gets the JSDoc this tag for the node if present */
+ function getJSDocThisTag(node: Node): JSDocThisTag | undefined;
+ /** Gets the JSDoc return tag for the node if present */
+ function getJSDocReturnTag(node: Node): JSDocReturnTag | undefined;
+ /** Gets the JSDoc template tag for the node if present */
+ function getJSDocTemplateTag(node: Node): JSDocTemplateTag | undefined;
+ /** Gets the JSDoc type tag for the node if present and valid */
+ function getJSDocTypeTag(node: Node): JSDocTypeTag | undefined;
+ /**
+ * Gets the type node for the node if provided via JSDoc.
+ *
+ * @remarks The search includes any JSDoc param tag that relates
+ * to the provided parameter, for example a type tag on the
+ * parameter itself, or a param tag on a containing function
+ * expression, or a param tag on a variable declaration whose
+ * initializer is the containing function. The tags closest to the
+ * node are examined first, so in the previous example, the type
+ * tag directly on the node would be returned.
+ */
+ function getJSDocType(node: Node): TypeNode | undefined;
+ /**
+ * Gets the return type node for the node if provided via JSDoc return tag or type tag.
+ *
+ * @remarks `getJSDocReturnTag` just gets the whole JSDoc tag. This function
+ * gets the type from inside the braces, after the fat arrow, etc.
+ */
+ function getJSDocReturnType(node: Node): TypeNode | undefined;
+ /** Get all JSDoc tags related to a node, including those on parent nodes. */
+ function getJSDocTags(node: Node): readonly JSDocTag[];
+ /** Gets all JSDoc tags that match a specified predicate */
+ function getAllJSDocTags<T extends JSDocTag>(node: Node, predicate: (tag: JSDocTag) => tag is T): readonly T[];
+ /** Gets all JSDoc tags of a specified kind */
+ function getAllJSDocTagsOfKind(node: Node, kind: SyntaxKind): readonly JSDocTag[];
+ /**
+ * Gets the effective type parameters. If the node was parsed in a
+ * JavaScript file, gets the type parameters from the `@template` tag from JSDoc.
+ */
+ function getEffectiveTypeParameterDeclarations(node: DeclarationWithTypeParameters): readonly TypeParameterDeclaration[];
+ function getEffectiveConstraintOfTypeParameter(node: TypeParameterDeclaration): TypeNode | undefined;
+ function isNumericLiteral(node: Node): node is NumericLiteral;
+ function isBigIntLiteral(node: Node): node is BigIntLiteral;
+ function isStringLiteral(node: Node): node is StringLiteral;
+ function isJsxText(node: Node): node is JsxText;
+ function isRegularExpressionLiteral(node: Node): node is RegularExpressionLiteral;
+ function isNoSubstitutionTemplateLiteral(node: Node): node is NoSubstitutionTemplateLiteral;
+ function isTemplateHead(node: Node): node is TemplateHead;
+ function isTemplateMiddle(node: Node): node is TemplateMiddle;
+ function isTemplateTail(node: Node): node is TemplateTail;
+ function isIdentifier(node: Node): node is Identifier;
+ function isQualifiedName(node: Node): node is QualifiedName;
+ function isComputedPropertyName(node: Node): node is ComputedPropertyName;
+ function isPrivateIdentifier(node: Node): node is PrivateIdentifier;
+ function isIdentifierOrPrivateIdentifier(node: Node): node is Identifier | PrivateIdentifier;
+ function isTypeParameterDeclaration(node: Node): node is TypeParameterDeclaration;
+ function isParameter(node: Node): node is ParameterDeclaration;
+ function isDecorator(node: Node): node is Decorator;
+ function isPropertySignature(node: Node): node is PropertySignature;
+ function isPropertyDeclaration(node: Node): node is PropertyDeclaration;
+ function isMethodSignature(node: Node): node is MethodSignature;
+ function isMethodDeclaration(node: Node): node is MethodDeclaration;
+ function isConstructorDeclaration(node: Node): node is ConstructorDeclaration;
+ function isGetAccessorDeclaration(node: Node): node is GetAccessorDeclaration;
+ function isSetAccessorDeclaration(node: Node): node is SetAccessorDeclaration;
+ function isCallSignatureDeclaration(node: Node): node is CallSignatureDeclaration;
+ function isConstructSignatureDeclaration(node: Node): node is ConstructSignatureDeclaration;
+ function isIndexSignatureDeclaration(node: Node): node is IndexSignatureDeclaration;
+ function isTypePredicateNode(node: Node): node is TypePredicateNode;
+ function isTypeReferenceNode(node: Node): node is TypeReferenceNode;
+ function isFunctionTypeNode(node: Node): node is FunctionTypeNode;
+ function isConstructorTypeNode(node: Node): node is ConstructorTypeNode;
+ function isTypeQueryNode(node: Node): node is TypeQueryNode;
+ function isTypeLiteralNode(node: Node): node is TypeLiteralNode;
+ function isArrayTypeNode(node: Node): node is ArrayTypeNode;
+ function isTupleTypeNode(node: Node): node is TupleTypeNode;
+ function isUnionTypeNode(node: Node): node is UnionTypeNode;
+ function isIntersectionTypeNode(node: Node): node is IntersectionTypeNode;
+ function isConditionalTypeNode(node: Node): node is ConditionalTypeNode;
+ function isInferTypeNode(node: Node): node is InferTypeNode;
+ function isParenthesizedTypeNode(node: Node): node is ParenthesizedTypeNode;
+ function isThisTypeNode(node: Node): node is ThisTypeNode;
+ function isTypeOperatorNode(node: Node): node is TypeOperatorNode;
+ function isIndexedAccessTypeNode(node: Node): node is IndexedAccessTypeNode;
+ function isMappedTypeNode(node: Node): node is MappedTypeNode;
+ function isLiteralTypeNode(node: Node): node is LiteralTypeNode;
+ function isImportTypeNode(node: Node): node is ImportTypeNode;
+ function isObjectBindingPattern(node: Node): node is ObjectBindingPattern;
+ function isArrayBindingPattern(node: Node): node is ArrayBindingPattern;
+ function isBindingElement(node: Node): node is BindingElement;
+ function isArrayLiteralExpression(node: Node): node is ArrayLiteralExpression;
+ function isObjectLiteralExpression(node: Node): node is ObjectLiteralExpression;
+ function isPropertyAccessExpression(node: Node): node is PropertyAccessExpression;
+ function isPropertyAccessChain(node: Node): node is PropertyAccessChain;
+ function isElementAccessExpression(node: Node): node is ElementAccessExpression;
+ function isElementAccessChain(node: Node): node is ElementAccessChain;
+ function isCallExpression(node: Node): node is CallExpression;
+ function isCallChain(node: Node): node is CallChain;
+ function isOptionalChain(node: Node): node is PropertyAccessChain | ElementAccessChain | CallChain | NonNullChain;
+ function isNullishCoalesce(node: Node): boolean;
+ function isNewExpression(node: Node): node is NewExpression;
+ function isTaggedTemplateExpression(node: Node): node is TaggedTemplateExpression;
+ function isTypeAssertion(node: Node): node is TypeAssertion;
+ function isConstTypeReference(node: Node): boolean;
+ function isParenthesizedExpression(node: Node): node is ParenthesizedExpression;
+ function skipPartiallyEmittedExpressions(node: Expression): Expression;
+ function skipPartiallyEmittedExpressions(node: Node): Node;
+ function isFunctionExpression(node: Node): node is FunctionExpression;
+ function isArrowFunction(node: Node): node is ArrowFunction;
+ function isDeleteExpression(node: Node): node is DeleteExpression;
+ function isTypeOfExpression(node: Node): node is TypeOfExpression;
+ function isVoidExpression(node: Node): node is VoidExpression;
+ function isAwaitExpression(node: Node): node is AwaitExpression;
+ function isPrefixUnaryExpression(node: Node): node is PrefixUnaryExpression;
+ function isPostfixUnaryExpression(node: Node): node is PostfixUnaryExpression;
+ function isBinaryExpression(node: Node): node is BinaryExpression;
+ function isConditionalExpression(node: Node): node is ConditionalExpression;
+ function isTemplateExpression(node: Node): node is TemplateExpression;
+ function isYieldExpression(node: Node): node is YieldExpression;
+ function isSpreadElement(node: Node): node is SpreadElement;
+ function isClassExpression(node: Node): node is ClassExpression;
+ function isOmittedExpression(node: Node): node is OmittedExpression;
+ function isExpressionWithTypeArguments(node: Node): node is ExpressionWithTypeArguments;
+ function isAsExpression(node: Node): node is AsExpression;
+ function isNonNullExpression(node: Node): node is NonNullExpression;
+ function isNonNullChain(node: Node): node is NonNullChain;
+ function isMetaProperty(node: Node): node is MetaProperty;
+ function isTemplateSpan(node: Node): node is TemplateSpan;
+ function isSemicolonClassElement(node: Node): node is SemicolonClassElement;
+ function isBlock(node: Node): node is Block;
+ function isVariableStatement(node: Node): node is VariableStatement;
+ function isEmptyStatement(node: Node): node is EmptyStatement;
+ function isExpressionStatement(node: Node): node is ExpressionStatement;
+ function isIfStatement(node: Node): node is IfStatement;
+ function isDoStatement(node: Node): node is DoStatement;
+ function isWhileStatement(node: Node): node is WhileStatement;
+ function isForStatement(node: Node): node is ForStatement;
+ function isForInStatement(node: Node): node is ForInStatement;
+ function isForOfStatement(node: Node): node is ForOfStatement;
+ function isContinueStatement(node: Node): node is ContinueStatement;
+ function isBreakStatement(node: Node): node is BreakStatement;
+ function isBreakOrContinueStatement(node: Node): node is BreakOrContinueStatement;
+ function isReturnStatement(node: Node): node is ReturnStatement;
+ function isWithStatement(node: Node): node is WithStatement;
+ function isSwitchStatement(node: Node): node is SwitchStatement;
+ function isLabeledStatement(node: Node): node is LabeledStatement;
+ function isThrowStatement(node: Node): node is ThrowStatement;
+ function isTryStatement(node: Node): node is TryStatement;
+ function isDebuggerStatement(node: Node): node is DebuggerStatement;
+ function isVariableDeclaration(node: Node): node is VariableDeclaration;
+ function isVariableDeclarationList(node: Node): node is VariableDeclarationList;
+ function isFunctionDeclaration(node: Node): node is FunctionDeclaration;
+ function isClassDeclaration(node: Node): node is ClassDeclaration;
+ function isInterfaceDeclaration(node: Node): node is InterfaceDeclaration;
+ function isTypeAliasDeclaration(node: Node): node is TypeAliasDeclaration;
+ function isEnumDeclaration(node: Node): node is EnumDeclaration;
+ function isModuleDeclaration(node: Node): node is ModuleDeclaration;
+ function isModuleBlock(node: Node): node is ModuleBlock;
+ function isCaseBlock(node: Node): node is CaseBlock;
+ function isNamespaceExportDeclaration(node: Node): node is NamespaceExportDeclaration;
+ function isImportEqualsDeclaration(node: Node): node is ImportEqualsDeclaration;
+ function isImportDeclaration(node: Node): node is ImportDeclaration;
+ function isImportClause(node: Node): node is ImportClause;
+ function isNamespaceImport(node: Node): node is NamespaceImport;
+ function isNamespaceExport(node: Node): node is NamespaceExport;
+ function isNamedExportBindings(node: Node): node is NamedExportBindings;
+ function isNamedImports(node: Node): node is NamedImports;
+ function isImportSpecifier(node: Node): node is ImportSpecifier;
+ function isExportAssignment(node: Node): node is ExportAssignment;
+ function isExportDeclaration(node: Node): node is ExportDeclaration;
+ function isNamedExports(node: Node): node is NamedExports;
+ function isExportSpecifier(node: Node): node is ExportSpecifier;
+ function isMissingDeclaration(node: Node): node is MissingDeclaration;
+ function isExternalModuleReference(node: Node): node is ExternalModuleReference;
+ function isJsxElement(node: Node): node is JsxElement;
+ function isJsxSelfClosingElement(node: Node): node is JsxSelfClosingElement;
+ function isJsxOpeningElement(node: Node): node is JsxOpeningElement;
+ function isJsxClosingElement(node: Node): node is JsxClosingElement;
+ function isJsxFragment(node: Node): node is JsxFragment;
+ function isJsxOpeningFragment(node: Node): node is JsxOpeningFragment;
+ function isJsxClosingFragment(node: Node): node is JsxClosingFragment;
+ function isJsxAttribute(node: Node): node is JsxAttribute;
+ function isJsxAttributes(node: Node): node is JsxAttributes;
+ function isJsxSpreadAttribute(node: Node): node is JsxSpreadAttribute;
+ function isJsxExpression(node: Node): node is JsxExpression;
+ function isCaseClause(node: Node): node is CaseClause;
+ function isDefaultClause(node: Node): node is DefaultClause;
+ function isHeritageClause(node: Node): node is HeritageClause;
+ function isCatchClause(node: Node): node is CatchClause;
+ function isPropertyAssignment(node: Node): node is PropertyAssignment;
+ function isShorthandPropertyAssignment(node: Node): node is ShorthandPropertyAssignment;
+ function isSpreadAssignment(node: Node): node is SpreadAssignment;
+ function isEnumMember(node: Node): node is EnumMember;
+ function isSourceFile(node: Node): node is SourceFile;
+ function isBundle(node: Node): node is Bundle;
+ function isUnparsedSource(node: Node): node is UnparsedSource;
+ function isUnparsedPrepend(node: Node): node is UnparsedPrepend;
+ function isUnparsedTextLike(node: Node): node is UnparsedTextLike;
+ function isUnparsedNode(node: Node): node is UnparsedNode;
+ function isJSDocTypeExpression(node: Node): node is JSDocTypeExpression;
+ function isJSDocAllType(node: Node): node is JSDocAllType;
+ function isJSDocUnknownType(node: Node): node is JSDocUnknownType;
+ function isJSDocNullableType(node: Node): node is JSDocNullableType;
+ function isJSDocNonNullableType(node: Node): node is JSDocNonNullableType;
+ function isJSDocOptionalType(node: Node): node is JSDocOptionalType;
+ function isJSDocFunctionType(node: Node): node is JSDocFunctionType;
+ function isJSDocVariadicType(node: Node): node is JSDocVariadicType;
+ function isJSDoc(node: Node): node is JSDoc;
+ function isJSDocAuthorTag(node: Node): node is JSDocAuthorTag;
+ function isJSDocAugmentsTag(node: Node): node is JSDocAugmentsTag;
+ function isJSDocImplementsTag(node: Node): node is JSDocImplementsTag;
+ function isJSDocClassTag(node: Node): node is JSDocClassTag;
+ function isJSDocPublicTag(node: Node): node is JSDocPublicTag;
+ function isJSDocPrivateTag(node: Node): node is JSDocPrivateTag;
+ function isJSDocProtectedTag(node: Node): node is JSDocProtectedTag;
+ function isJSDocReadonlyTag(node: Node): node is JSDocReadonlyTag;
+ function isJSDocEnumTag(node: Node): node is JSDocEnumTag;
+ function isJSDocThisTag(node: Node): node is JSDocThisTag;
+ function isJSDocParameterTag(node: Node): node is JSDocParameterTag;
+ function isJSDocReturnTag(node: Node): node is JSDocReturnTag;
+ function isJSDocTypeTag(node: Node): node is JSDocTypeTag;
+ function isJSDocTemplateTag(node: Node): node is JSDocTemplateTag;
+ function isJSDocTypedefTag(node: Node): node is JSDocTypedefTag;
+ function isJSDocPropertyTag(node: Node): node is JSDocPropertyTag;
+ function isJSDocPropertyLikeTag(node: Node): node is JSDocPropertyLikeTag;
+ function isJSDocTypeLiteral(node: Node): node is JSDocTypeLiteral;
+ function isJSDocCallbackTag(node: Node): node is JSDocCallbackTag;
+ function isJSDocSignature(node: Node): node is JSDocSignature;
+ /**
+ * True if node is of some token syntax kind.
+ * For example, this is true for an IfKeyword but not for an IfStatement.
+ * Literals are considered tokens, except TemplateLiteral, but does include TemplateHead/Middle/Tail.
+ */
+ function isToken(n: Node): boolean;
+ function isLiteralExpression(node: Node): node is LiteralExpression;
+ type TemplateLiteralToken = NoSubstitutionTemplateLiteral | TemplateHead | TemplateMiddle | TemplateTail;
+ function isTemplateLiteralToken(node: Node): node is TemplateLiteralToken;
+ function isTemplateMiddleOrTemplateTail(node: Node): node is TemplateMiddle | TemplateTail;
+ function isImportOrExportSpecifier(node: Node): node is ImportSpecifier | ExportSpecifier;
+ function isTypeOnlyImportOrExportDeclaration(node: Node): node is TypeOnlyCompatibleAliasDeclaration;
+ function isStringTextContainingNode(node: Node): node is StringLiteral | TemplateLiteralToken;
+ function isModifier(node: Node): node is Modifier;
+ function isEntityName(node: Node): node is EntityName;
+ function isPropertyName(node: Node): node is PropertyName;
+ function isBindingName(node: Node): node is BindingName;
+ function isFunctionLike(node: Node): node is SignatureDeclaration;
+ function isClassElement(node: Node): node is ClassElement;
+ function isClassLike(node: Node): node is ClassLikeDeclaration;
+ function isAccessor(node: Node): node is AccessorDeclaration;
+ function isTypeElement(node: Node): node is TypeElement;
+ function isClassOrTypeElement(node: Node): node is ClassElement | TypeElement;
+ function isObjectLiteralElementLike(node: Node): node is ObjectLiteralElementLike;
+ /**
+ * Node test that determines whether a node is a valid type node.
+ * This differs from the `isPartOfTypeNode` function which determines whether a node is *part*
+ * of a TypeNode.
+ */
+ function isTypeNode(node: Node): node is TypeNode;
+ function isFunctionOrConstructorTypeNode(node: Node): node is FunctionTypeNode | ConstructorTypeNode;
+ function isPropertyAccessOrQualifiedName(node: Node): node is PropertyAccessExpression | QualifiedName;
+ function isCallLikeExpression(node: Node): node is CallLikeExpression;
+ function isCallOrNewExpression(node: Node): node is CallExpression | NewExpression;
+ function isTemplateLiteral(node: Node): node is TemplateLiteral;
+ function isAssertionExpression(node: Node): node is AssertionExpression;
+ function isIterationStatement(node: Node, lookInLabeledStatements: false): node is IterationStatement;
+ function isIterationStatement(node: Node, lookInLabeledStatements: boolean): node is IterationStatement | LabeledStatement;
+ function isJsxOpeningLikeElement(node: Node): node is JsxOpeningLikeElement;
+ function isCaseOrDefaultClause(node: Node): node is CaseOrDefaultClause;
+ /** True if node is of a kind that may contain comment text. */
+ function isJSDocCommentContainingNode(node: Node): boolean;
+ function isSetAccessor(node: Node): node is SetAccessorDeclaration;
+ function isGetAccessor(node: Node): node is GetAccessorDeclaration;
+ /** True if has initializer node attached to it. */
+ function hasOnlyExpressionInitializer(node: Node): node is HasExpressionInitializer;
+ function isObjectLiteralElement(node: Node): node is ObjectLiteralElement;
+ function isStringLiteralLike(node: Node): node is StringLiteralLike;
+}
+declare namespace ts {
+ export function createNode(kind: SyntaxKind, pos?: number, end?: number): Node;
+ /**
+ * Invokes a callback for each child of the given node. The 'cbNode' callback is invoked for all child nodes
+ * stored in properties. If a 'cbNodes' callback is specified, it is invoked for embedded arrays; otherwise,
+ * embedded arrays are flattened and the 'cbNode' callback is invoked for each element. If a callback returns
+ * a truthy value, iteration stops and that value is returned. Otherwise, undefined is returned.
+ *
+ * @param node a given node to visit its children
+ * @param cbNode a callback to be invoked for all child nodes
+ * @param cbNodes a callback to be invoked for embedded array
+ *
+ * @remarks `forEachChild` must visit the children of a node in the order
+ * that they appear in the source code. The language service depends on this property to locate nodes by position.
+ */
+ export function forEachChild<T>(node: Node, cbNode: (node: Node) => T | undefined, cbNodes?: (nodes: NodeArray<Node>) => T | undefined): T | undefined;
+ export function createSourceFile(fileName: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes?: boolean, scriptKind?: ScriptKind): SourceFile;
+ export function parseIsolatedEntityName(text: string, languageVersion: ScriptTarget): EntityName | undefined;
+ /**
+ * Parse json text into SyntaxTree and return node and parse errors if any
+ * @param fileName
+ * @param sourceText
+ */
+ export function parseJsonText(fileName: string, sourceText: string): JsonSourceFile;
+ export function isExternalModule(file: SourceFile): boolean;
+ export function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile;
+ export {};
+}
+declare namespace ts {
+ export function parseCommandLine(commandLine: readonly string[], readFile?: (path: string) => string | undefined): ParsedCommandLine;
+ export type DiagnosticReporter = (diagnostic: Diagnostic) => void;
+ /**
+ * Reports config file diagnostics
+ */
+ export interface ConfigFileDiagnosticsReporter {
+ /**
+ * Reports unrecoverable error when parsing config file
+ */
+ onUnRecoverableConfigFileDiagnostic: DiagnosticReporter;
+ }
+ /**
+ * Interface extending ParseConfigHost to support ParseConfigFile that reads config file and reports errors
+ */
+ export interface ParseConfigFileHost extends ParseConfigHost, ConfigFileDiagnosticsReporter {
+ getCurrentDirectory(): string;
+ }
+ /**
+ * Reads the config file, reports errors if any and exits if the config file cannot be found
+ */
+ export function getParsedCommandLineOfConfigFile(configFileName: string, optionsToExtend: CompilerOptions, host: ParseConfigFileHost, extendedConfigCache?: Map<ExtendedConfigCacheEntry>, watchOptionsToExtend?: WatchOptions, extraFileExtensions?: readonly FileExtensionInfo[]): ParsedCommandLine | undefined;
+ /**
+ * Read tsconfig.json file
+ * @param fileName The path to the config file
+ */
+ export function readConfigFile(fileName: string, readFile: (path: string) => string | undefined): {
+ config?: any;
+ error?: Diagnostic;
+ };
+ /**
+ * Parse the text of the tsconfig.json file
+ * @param fileName The path to the config file
+ * @param jsonText The text of the config file
+ */
+ export function parseConfigFileTextToJson(fileName: string, jsonText: string): {
+ config?: any;
+ error?: Diagnostic;
+ };
+ /**
+ * Read tsconfig.json file
+ * @param fileName The path to the config file
+ */
+ export function readJsonConfigFile(fileName: string, readFile: (path: string) => string | undefined): TsConfigSourceFile;
+ /**
+ * Convert the json syntax tree into the json value
+ */
+ export function convertToObject(sourceFile: JsonSourceFile, errors: Push<Diagnostic>): any;
+ /**
+ * Parse the contents of a config file (tsconfig.json).
+ * @param json The contents of the config file to parse
+ * @param host Instance of ParseConfigHost used to enumerate files in folder.
+ * @param basePath A root directory to resolve relative path entries in the config
+ * file to. e.g. outDir
+ */
+ export function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: readonly FileExtensionInfo[], extendedConfigCache?: Map<ExtendedConfigCacheEntry>, existingWatchOptions?: WatchOptions): ParsedCommandLine;
+ /**
+ * Parse the contents of a config file (tsconfig.json).
+ * @param jsonNode The contents of the config file to parse
+ * @param host Instance of ParseConfigHost used to enumerate files in folder.
+ * @param basePath A root directory to resolve relative path entries in the config
+ * file to. e.g. outDir
+ */
+ export function parseJsonSourceFileConfigFileContent(sourceFile: TsConfigSourceFile, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: readonly FileExtensionInfo[], extendedConfigCache?: Map<ExtendedConfigCacheEntry>, existingWatchOptions?: WatchOptions): ParsedCommandLine;
+ export interface ParsedTsconfig {
+ raw: any;
+ options?: CompilerOptions;
+ watchOptions?: WatchOptions;
+ typeAcquisition?: TypeAcquisition;
+ /**
+ * Note that the case of the config path has not yet been normalized, as no files have been imported into the project yet
+ */
+ extendedConfigPath?: string;
+ }
+ export interface ExtendedConfigCacheEntry {
+ extendedResult: TsConfigSourceFile;
+ extendedConfig: ParsedTsconfig | undefined;
+ }
+ export function convertCompilerOptionsFromJson(jsonOptions: any, basePath: string, configFileName?: string): {
+ options: CompilerOptions;
+ errors: Diagnostic[];
+ };
+ export function convertTypeAcquisitionFromJson(jsonOptions: any, basePath: string, configFileName?: string): {
+ options: TypeAcquisition;
+ errors: Diagnostic[];
+ };
+ export {};
+}
+declare namespace ts {
+ function getEffectiveTypeRoots(options: CompilerOptions, host: GetEffectiveTypeRootsHost): string[] | undefined;
+ /**
+ * @param {string | undefined} containingFile - file that contains type reference directive, can be undefined if containing file is unknown.
+ * This is possible in case if resolution is performed for directives specified via 'types' parameter. In this case initial path for secondary lookups
+ * is assumed to be the same as root directory of the project.
+ */
+ function resolveTypeReferenceDirective(typeReferenceDirectiveName: string, containingFile: string | undefined, options: CompilerOptions, host: ModuleResolutionHost, redirectedReference?: ResolvedProjectReference): ResolvedTypeReferenceDirectiveWithFailedLookupLocations;
+ /**
+ * Given a set of options, returns the set of type directive names
+ * that should be included for this program automatically.
+ * This list could either come from the config file,
+ * or from enumerating the types root + initial secondary types lookup location.
+ * More type directives might appear in the program later as a result of loading actual source files;
+ * this list is only the set of defaults that are implicitly included.
+ */
+ function getAutomaticTypeDirectiveNames(options: CompilerOptions, host: ModuleResolutionHost): string[];
+ /**
+ * Cached module resolutions per containing directory.
+ * This assumes that any module id will have the same resolution for sibling files located in the same folder.
+ */
+ interface ModuleResolutionCache extends NonRelativeModuleNameResolutionCache {
+ getOrCreateCacheForDirectory(directoryName: string, redirectedReference?: ResolvedProjectReference): Map<ResolvedModuleWithFailedLookupLocations>;
+ }
+ /**
+ * Stored map from non-relative module name to a table: directory -> result of module lookup in this directory
+ * We support only non-relative module names because resolution of relative module names is usually more deterministic and thus less expensive.
+ */
+ interface NonRelativeModuleNameResolutionCache {
+ getOrCreateCacheForModuleName(nonRelativeModuleName: string, redirectedReference?: ResolvedProjectReference): PerModuleNameCache;
+ }
+ interface PerModuleNameCache {
+ get(directory: string): ResolvedModuleWithFailedLookupLocations | undefined;
+ set(directory: string, result: ResolvedModuleWithFailedLookupLocations): void;
+ }
+ function createModuleResolutionCache(currentDirectory: string, getCanonicalFileName: (s: string) => string, options?: CompilerOptions): ModuleResolutionCache;
+ function resolveModuleNameFromCache(moduleName: string, containingFile: string, cache: ModuleResolutionCache): ResolvedModuleWithFailedLookupLocations | undefined;
+ function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations;
+ function nodeModuleNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations;
+ function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: NonRelativeModuleNameResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations;
+}
+declare namespace ts {
+ function createNodeArray<T extends Node>(elements?: readonly T[], hasTrailingComma?: boolean): NodeArray<T>;
+ /** If a node is passed, creates a string literal whose source text is read from a source node during emit. */
+ function createLiteral(value: string | StringLiteral | NoSubstitutionTemplateLiteral | NumericLiteral | Identifier): StringLiteral;
+ function createLiteral(value: number | PseudoBigInt): NumericLiteral;
+ function createLiteral(value: boolean): BooleanLiteral;
+ function createLiteral(value: string | number | PseudoBigInt | boolean): PrimaryExpression;
+ function createNumericLiteral(value: string, numericLiteralFlags?: TokenFlags): NumericLiteral;
+ function createBigIntLiteral(value: string): BigIntLiteral;
+ function createStringLiteral(text: string): StringLiteral;
+ function createRegularExpressionLiteral(text: string): RegularExpressionLiteral;
+ function createIdentifier(text: string): Identifier;
+ function updateIdentifier(node: Identifier): Identifier;
+ /** Create a unique temporary variable. */
+ function createTempVariable(recordTempVariable: ((node: Identifier) => void) | undefined): Identifier;
+ /** Create a unique temporary variable for use in a loop. */
+ function createLoopVariable(): Identifier;
+ /** Create a unique name based on the supplied text. */
+ function createUniqueName(text: string): Identifier;
+ /** Create a unique name based on the supplied text. */
+ function createOptimisticUniqueName(text: string): Identifier;
+ /** Create a unique name based on the supplied text. This does not consider names injected by the transformer. */
+ function createFileLevelUniqueName(text: string): Identifier;
+ /** Create a unique name generated for a node. */
+ function getGeneratedNameForNode(node: Node | undefined): Identifier;
+ function createPrivateIdentifier(text: string): PrivateIdentifier;
+ function createToken<TKind extends SyntaxKind>(token: TKind): Token<TKind>;
+ function createSuper(): SuperExpression;
+ function createThis(): ThisExpression & Token<SyntaxKind.ThisKeyword>;
+ function createNull(): NullLiteral & Token<SyntaxKind.NullKeyword>;
+ function createTrue(): BooleanLiteral & Token<SyntaxKind.TrueKeyword>;
+ function createFalse(): BooleanLiteral & Token<SyntaxKind.FalseKeyword>;
+ function createModifier<T extends Modifier["kind"]>(kind: T): Token<T>;
+ function createModifiersFromModifierFlags(flags: ModifierFlags): Modifier[];
+ function createQualifiedName(left: EntityName, right: string | Identifier): QualifiedName;
+ function updateQualifiedName(node: QualifiedName, left: EntityName, right: Identifier): QualifiedName;
+ function createComputedPropertyName(expression: Expression): ComputedPropertyName;
+ function updateComputedPropertyName(node: ComputedPropertyName, expression: Expression): ComputedPropertyName;
+ function createTypeParameterDeclaration(name: string | Identifier, constraint?: TypeNode, defaultType?: TypeNode): TypeParameterDeclaration;
+ function updateTypeParameterDeclaration(node: TypeParameterDeclaration, name: Identifier, constraint: TypeNode | undefined, defaultType: TypeNode | undefined): TypeParameterDeclaration;
+ function createParameter(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken?: QuestionToken, type?: TypeNode, initializer?: Expression): ParameterDeclaration;
+ function updateParameter(node: ParameterDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, dotDotDotToken: DotDotDotToken | undefined, name: string | BindingName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): ParameterDeclaration;
+ function createDecorator(expression: Expression): Decorator;
+ function updateDecorator(node: Decorator, expression: Expression): Decorator;
+ function createPropertySignature(modifiers: readonly Modifier[] | undefined, name: PropertyName | string, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertySignature;
+ function updatePropertySignature(node: PropertySignature, modifiers: readonly Modifier[] | undefined, name: PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertySignature;
+ function createProperty(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration;
+ function updateProperty(node: PropertyDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, questionOrExclamationToken: QuestionToken | ExclamationToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration;
+ function createMethodSignature(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined): MethodSignature;
+ function updateMethodSignature(node: MethodSignature, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined, name: PropertyName, questionToken: QuestionToken | undefined): MethodSignature;
+ function createMethod(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): MethodDeclaration;
+ function updateMethod(node: MethodDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: PropertyName, questionToken: QuestionToken | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): MethodDeclaration;
+ function createConstructor(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration;
+ function updateConstructor(node: ConstructorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], body: Block | undefined): ConstructorDeclaration;
+ function createGetAccessor(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration;
+ function updateGetAccessor(node: GetAccessorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): GetAccessorDeclaration;
+ function createSetAccessor(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration;
+ function updateSetAccessor(node: SetAccessorDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: PropertyName, parameters: readonly ParameterDeclaration[], body: Block | undefined): SetAccessorDeclaration;
+ function createCallSignature(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): CallSignatureDeclaration;
+ function updateCallSignature(node: CallSignatureDeclaration, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined): CallSignatureDeclaration;
+ function createConstructSignature(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): ConstructSignatureDeclaration;
+ function updateConstructSignature(node: ConstructSignatureDeclaration, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined): ConstructSignatureDeclaration;
+ function createIndexSignature(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration;
+ function updateIndexSignature(node: IndexSignatureDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration;
+ function createKeywordTypeNode(kind: KeywordTypeNode["kind"]): KeywordTypeNode;
+ function createTypePredicateNode(parameterName: Identifier | ThisTypeNode | string, type: TypeNode): TypePredicateNode;
+ function createTypePredicateNodeWithModifier(assertsModifier: AssertsToken | undefined, parameterName: Identifier | ThisTypeNode | string, type: TypeNode | undefined): TypePredicateNode;
+ function updateTypePredicateNode(node: TypePredicateNode, parameterName: Identifier | ThisTypeNode, type: TypeNode): TypePredicateNode;
+ function updateTypePredicateNodeWithModifier(node: TypePredicateNode, assertsModifier: AssertsToken | undefined, parameterName: Identifier | ThisTypeNode, type: TypeNode | undefined): TypePredicateNode;
+ function createTypeReferenceNode(typeName: string | EntityName, typeArguments: readonly TypeNode[] | undefined): TypeReferenceNode;
+ function updateTypeReferenceNode(node: TypeReferenceNode, typeName: EntityName, typeArguments: NodeArray<TypeNode> | undefined): TypeReferenceNode;
+ function createFunctionTypeNode(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): FunctionTypeNode;
+ function updateFunctionTypeNode(node: FunctionTypeNode, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined): FunctionTypeNode;
+ function createConstructorTypeNode(typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): ConstructorTypeNode;
+ function updateConstructorTypeNode(node: ConstructorTypeNode, typeParameters: NodeArray<TypeParameterDeclaration> | undefined, parameters: NodeArray<ParameterDeclaration>, type: TypeNode | undefined): ConstructorTypeNode;
+ function createTypeQueryNode(exprName: EntityName): TypeQueryNode;
+ function updateTypeQueryNode(node: TypeQueryNode, exprName: EntityName): TypeQueryNode;
+ function createTypeLiteralNode(members: readonly TypeElement[] | undefined): TypeLiteralNode;
+ function updateTypeLiteralNode(node: TypeLiteralNode, members: NodeArray<TypeElement>): TypeLiteralNode;
+ function createArrayTypeNode(elementType: TypeNode): ArrayTypeNode;
+ function updateArrayTypeNode(node: ArrayTypeNode, elementType: TypeNode): ArrayTypeNode;
+ function createTupleTypeNode(elementTypes: readonly TypeNode[]): TupleTypeNode;
+ function updateTupleTypeNode(node: TupleTypeNode, elementTypes: readonly TypeNode[]): TupleTypeNode;
+ function createOptionalTypeNode(type: TypeNode): OptionalTypeNode;
+ function updateOptionalTypeNode(node: OptionalTypeNode, type: TypeNode): OptionalTypeNode;
+ function createRestTypeNode(type: TypeNode): RestTypeNode;
+ function updateRestTypeNode(node: RestTypeNode, type: TypeNode): RestTypeNode;
+ function createUnionTypeNode(types: readonly TypeNode[]): UnionTypeNode;
+ function updateUnionTypeNode(node: UnionTypeNode, types: NodeArray<TypeNode>): UnionTypeNode;
+ function createIntersectionTypeNode(types: readonly TypeNode[]): IntersectionTypeNode;
+ function updateIntersectionTypeNode(node: IntersectionTypeNode, types: NodeArray<TypeNode>): IntersectionTypeNode;
+ function createUnionOrIntersectionTypeNode(kind: SyntaxKind.UnionType | SyntaxKind.IntersectionType, types: readonly TypeNode[]): UnionOrIntersectionTypeNode;
+ function createConditionalTypeNode(checkType: TypeNode, extendsType: TypeNode, trueType: TypeNode, falseType: TypeNode): ConditionalTypeNode;
+ function updateConditionalTypeNode(node: ConditionalTypeNode, checkType: TypeNode, extendsType: TypeNode, trueType: TypeNode, falseType: TypeNode): ConditionalTypeNode;
+ function createInferTypeNode(typeParameter: TypeParameterDeclaration): InferTypeNode;
+ function updateInferTypeNode(node: InferTypeNode, typeParameter: TypeParameterDeclaration): InferTypeNode;
+ function createImportTypeNode(argument: TypeNode, qualifier?: EntityName, typeArguments?: readonly TypeNode[], isTypeOf?: boolean): ImportTypeNode;
+ function updateImportTypeNode(node: ImportTypeNode, argument: TypeNode, qualifier?: EntityName, typeArguments?: readonly TypeNode[], isTypeOf?: boolean): ImportTypeNode;
+ function createParenthesizedType(type: TypeNode): ParenthesizedTypeNode;
+ function updateParenthesizedType(node: ParenthesizedTypeNode, type: TypeNode): ParenthesizedTypeNode;
+ function createThisTypeNode(): ThisTypeNode;
+ function createTypeOperatorNode(type: TypeNode): TypeOperatorNode;
+ function createTypeOperatorNode(operator: SyntaxKind.KeyOfKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.ReadonlyKeyword, type: TypeNode): TypeOperatorNode;
+ function updateTypeOperatorNode(node: TypeOperatorNode, type: TypeNode): TypeOperatorNode;
+ function createIndexedAccessTypeNode(objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode;
+ function updateIndexedAccessTypeNode(node: IndexedAccessTypeNode, objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode;
+ function createMappedTypeNode(readonlyToken: ReadonlyToken | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined): MappedTypeNode;
+ function updateMappedTypeNode(node: MappedTypeNode, readonlyToken: ReadonlyToken | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined): MappedTypeNode;
+ function createLiteralTypeNode(literal: LiteralTypeNode["literal"]): LiteralTypeNode;
+ function updateLiteralTypeNode(node: LiteralTypeNode, literal: LiteralTypeNode["literal"]): LiteralTypeNode;
+ function createObjectBindingPattern(elements: readonly BindingElement[]): ObjectBindingPattern;
+ function updateObjectBindingPattern(node: ObjectBindingPattern, elements: readonly BindingElement[]): ObjectBindingPattern;
+ function createArrayBindingPattern(elements: readonly ArrayBindingElement[]): ArrayBindingPattern;
+ function updateArrayBindingPattern(node: ArrayBindingPattern, elements: readonly ArrayBindingElement[]): ArrayBindingPattern;
+ function createBindingElement(dotDotDotToken: DotDotDotToken | undefined, propertyName: string | PropertyName | undefined, name: string | BindingName, initializer?: Expression): BindingElement;
+ function updateBindingElement(node: BindingElement, dotDotDotToken: DotDotDotToken | undefined, propertyName: PropertyName | undefined, name: BindingName, initializer: Expression | undefined): BindingElement;
+ function createArrayLiteral(elements?: readonly Expression[], multiLine?: boolean): ArrayLiteralExpression;
+ function updateArrayLiteral(node: ArrayLiteralExpression, elements: readonly Expression[]): ArrayLiteralExpression;
+ function createObjectLiteral(properties?: readonly ObjectLiteralElementLike[], multiLine?: boolean): ObjectLiteralExpression;
+ function updateObjectLiteral(node: ObjectLiteralExpression, properties: readonly ObjectLiteralElementLike[]): ObjectLiteralExpression;
+ function createPropertyAccess(expression: Expression, name: string | Identifier | PrivateIdentifier): PropertyAccessExpression;
+ function updatePropertyAccess(node: PropertyAccessExpression, expression: Expression, name: Identifier | PrivateIdentifier): PropertyAccessExpression;
+ function createPropertyAccessChain(expression: Expression, questionDotToken: QuestionDotToken | undefined, name: string | Identifier): PropertyAccessChain;
+ function updatePropertyAccessChain(node: PropertyAccessChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, name: Identifier): PropertyAccessChain;
+ function createElementAccess(expression: Expression, index: number | Expression): ElementAccessExpression;
+ function updateElementAccess(node: ElementAccessExpression, expression: Expression, argumentExpression: Expression): ElementAccessExpression;
+ function createElementAccessChain(expression: Expression, questionDotToken: QuestionDotToken | undefined, index: number | Expression): ElementAccessChain;
+ function updateElementAccessChain(node: ElementAccessChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, argumentExpression: Expression): ElementAccessChain;
+ function createCall(expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined): CallExpression;
+ function updateCall(node: CallExpression, expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[]): CallExpression;
+ function createCallChain(expression: Expression, questionDotToken: QuestionDotToken | undefined, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined): CallChain;
+ function updateCallChain(node: CallChain, expression: Expression, questionDotToken: QuestionDotToken | undefined, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[]): CallChain;
+ function createNew(expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined): NewExpression;
+ function updateNew(node: NewExpression, expression: Expression, typeArguments: readonly TypeNode[] | undefined, argumentsArray: readonly Expression[] | undefined): NewExpression;
+ /** @deprecated */ function createTaggedTemplate(tag: Expression, template: TemplateLiteral): TaggedTemplateExpression;
+ function createTaggedTemplate(tag: Expression, typeArguments: readonly TypeNode[] | undefined, template: TemplateLiteral): TaggedTemplateExpression;
+ /** @deprecated */ function updateTaggedTemplate(node: TaggedTemplateExpression, tag: Expression, template: TemplateLiteral): TaggedTemplateExpression;
+ function updateTaggedTemplate(node: TaggedTemplateExpression, tag: Expression, typeArguments: readonly TypeNode[] | undefined, template: TemplateLiteral): TaggedTemplateExpression;
+ function createTypeAssertion(type: TypeNode, expression: Expression): TypeAssertion;
+ function updateTypeAssertion(node: TypeAssertion, type: TypeNode, expression: Expression): TypeAssertion;
+ function createParen(expression: Expression): ParenthesizedExpression;
+ function updateParen(node: ParenthesizedExpression, expression: Expression): ParenthesizedExpression;
+ function createFunctionExpression(modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[] | undefined, type: TypeNode | undefined, body: Block): FunctionExpression;
+ function updateFunctionExpression(node: FunctionExpression, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block): FunctionExpression;
+ function createArrowFunction(modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanToken: EqualsGreaterThanToken | undefined, body: ConciseBody): ArrowFunction;
+ function updateArrowFunction(node: ArrowFunction, modifiers: readonly Modifier[] | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, equalsGreaterThanToken: Token<SyntaxKind.EqualsGreaterThanToken>, body: ConciseBody): ArrowFunction;
+ function createDelete(expression: Expression): DeleteExpression;
+ function updateDelete(node: DeleteExpression, expression: Expression): DeleteExpression;
+ function createTypeOf(expression: Expression): TypeOfExpression;
+ function updateTypeOf(node: TypeOfExpression, expression: Expression): TypeOfExpression;
+ function createVoid(expression: Expression): VoidExpression;
+ function updateVoid(node: VoidExpression, expression: Expression): VoidExpression;
+ function createAwait(expression: Expression): AwaitExpression;
+ function updateAwait(node: AwaitExpression, expression: Expression): AwaitExpression;
+ function createPrefix(operator: PrefixUnaryOperator, operand: Expression): PrefixUnaryExpression;
+ function updatePrefix(node: PrefixUnaryExpression, operand: Expression): PrefixUnaryExpression;
+ function createPostfix(operand: Expression, operator: PostfixUnaryOperator): PostfixUnaryExpression;
+ function updatePostfix(node: PostfixUnaryExpression, operand: Expression): PostfixUnaryExpression;
+ function createBinary(left: Expression, operator: BinaryOperator | BinaryOperatorToken, right: Expression): BinaryExpression;
+ function updateBinary(node: BinaryExpression, left: Expression, right: Expression, operator?: BinaryOperator | BinaryOperatorToken): BinaryExpression;
+ /** @deprecated */ function createConditional(condition: Expression, whenTrue: Expression, whenFalse: Expression): ConditionalExpression;
+ function createConditional(condition: Expression, questionToken: QuestionToken, whenTrue: Expression, colonToken: ColonToken, whenFalse: Expression): ConditionalExpression;
+ function updateConditional(node: ConditionalExpression, condition: Expression, questionToken: Token<SyntaxKind.QuestionToken>, whenTrue: Expression, colonToken: Token<SyntaxKind.ColonToken>, whenFalse: Expression): ConditionalExpression;
+ function createTemplateExpression(head: TemplateHead, templateSpans: readonly TemplateSpan[]): TemplateExpression;
+ function updateTemplateExpression(node: TemplateExpression, head: TemplateHead, templateSpans: readonly TemplateSpan[]): TemplateExpression;
+ function createTemplateHead(text: string, rawText?: string): TemplateHead;
+ function createTemplateMiddle(text: string, rawText?: string): TemplateMiddle;
+ function createTemplateTail(text: string, rawText?: string): TemplateTail;
+ function createNoSubstitutionTemplateLiteral(text: string, rawText?: string): NoSubstitutionTemplateLiteral;
+ function createYield(expression?: Expression): YieldExpression;
+ function createYield(asteriskToken: AsteriskToken | undefined, expression: Expression): YieldExpression;
+ function updateYield(node: YieldExpression, asteriskToken: AsteriskToken | undefined, expression: Expression): YieldExpression;
+ function createSpread(expression: Expression): SpreadElement;
+ function updateSpread(node: SpreadElement, expression: Expression): SpreadElement;
+ function createClassExpression(modifiers: readonly Modifier[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassExpression;
+ function updateClassExpression(node: ClassExpression, modifiers: readonly Modifier[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassExpression;
+ function createOmittedExpression(): OmittedExpression;
+ function createExpressionWithTypeArguments(typeArguments: readonly TypeNode[] | undefined, expression: Expression): ExpressionWithTypeArguments;
+ function updateExpressionWithTypeArguments(node: ExpressionWithTypeArguments, typeArguments: readonly TypeNode[] | undefined, expression: Expression): ExpressionWithTypeArguments;
+ function createAsExpression(expression: Expression, type: TypeNode): AsExpression;
+ function updateAsExpression(node: AsExpression, expression: Expression, type: TypeNode): AsExpression;
+ function createNonNullExpression(expression: Expression): NonNullExpression;
+ function updateNonNullExpression(node: NonNullExpression, expression: Expression): NonNullExpression;
+ function createNonNullChain(expression: Expression): NonNullChain;
+ function updateNonNullChain(node: NonNullChain, expression: Expression): NonNullChain;
+ function createMetaProperty(keywordToken: MetaProperty["keywordToken"], name: Identifier): MetaProperty;
+ function updateMetaProperty(node: MetaProperty, name: Identifier): MetaProperty;
+ function createTemplateSpan(expression: Expression, literal: TemplateMiddle | TemplateTail): TemplateSpan;
+ function updateTemplateSpan(node: TemplateSpan, expression: Expression, literal: TemplateMiddle | TemplateTail): TemplateSpan;
+ function createSemicolonClassElement(): SemicolonClassElement;
+ function createBlock(statements: readonly Statement[], multiLine?: boolean): Block;
+ function updateBlock(node: Block, statements: readonly Statement[]): Block;
+ function createVariableStatement(modifiers: readonly Modifier[] | undefined, declarationList: VariableDeclarationList | readonly VariableDeclaration[]): VariableStatement;
+ function updateVariableStatement(node: VariableStatement, modifiers: readonly Modifier[] | undefined, declarationList: VariableDeclarationList): VariableStatement;
+ function createEmptyStatement(): EmptyStatement;
+ function createExpressionStatement(expression: Expression): ExpressionStatement;
+ function updateExpressionStatement(node: ExpressionStatement, expression: Expression): ExpressionStatement;
+ /** @deprecated Use `createExpressionStatement` instead. */
+ const createStatement: typeof createExpressionStatement;
+ /** @deprecated Use `updateExpressionStatement` instead. */
+ const updateStatement: typeof updateExpressionStatement;
+ function createIf(expression: Expression, thenStatement: Statement, elseStatement?: Statement): IfStatement;
+ function updateIf(node: IfStatement, expression: Expression, thenStatement: Statement, elseStatement: Statement | undefined): IfStatement;
+ function createDo(statement: Statement, expression: Expression): DoStatement;
+ function updateDo(node: DoStatement, statement: Statement, expression: Expression): DoStatement;
+ function createWhile(expression: Expression, statement: Statement): WhileStatement;
+ function updateWhile(node: WhileStatement, expression: Expression, statement: Statement): WhileStatement;
+ function createFor(initializer: ForInitializer | undefined, condition: Expression | undefined, incrementor: Expression | undefined, statement: Statement): ForStatement;
+ function updateFor(node: ForStatement, initializer: ForInitializer | undefined, condition: Expression | undefined, incrementor: Expression | undefined, statement: Statement): ForStatement;
+ function createForIn(initializer: ForInitializer, expression: Expression, statement: Statement): ForInStatement;
+ function updateForIn(node: ForInStatement, initializer: ForInitializer, expression: Expression, statement: Statement): ForInStatement;
+ function createForOf(awaitModifier: AwaitKeywordToken | undefined, initializer: ForInitializer, expression: Expression, statement: Statement): ForOfStatement;
+ function updateForOf(node: ForOfStatement, awaitModifier: AwaitKeywordToken | undefined, initializer: ForInitializer, expression: Expression, statement: Statement): ForOfStatement;
+ function createContinue(label?: string | Identifier): ContinueStatement;
+ function updateContinue(node: ContinueStatement, label: Identifier | undefined): ContinueStatement;
+ function createBreak(label?: string | Identifier): BreakStatement;
+ function updateBreak(node: BreakStatement, label: Identifier | undefined): BreakStatement;
+ function createReturn(expression?: Expression): ReturnStatement;
+ function updateReturn(node: ReturnStatement, expression: Expression | undefined): ReturnStatement;
+ function createWith(expression: Expression, statement: Statement): WithStatement;
+ function updateWith(node: WithStatement, expression: Expression, statement: Statement): WithStatement;
+ function createSwitch(expression: Expression, caseBlock: CaseBlock): SwitchStatement;
+ function updateSwitch(node: SwitchStatement, expression: Expression, caseBlock: CaseBlock): SwitchStatement;
+ function createLabel(label: string | Identifier, statement: Statement): LabeledStatement;
+ function updateLabel(node: LabeledStatement, label: Identifier, statement: Statement): LabeledStatement;
+ function createThrow(expression: Expression): ThrowStatement;
+ function updateThrow(node: ThrowStatement, expression: Expression): ThrowStatement;
+ function createTry(tryBlock: Block, catchClause: CatchClause | undefined, finallyBlock: Block | undefined): TryStatement;
+ function updateTry(node: TryStatement, tryBlock: Block, catchClause: CatchClause | undefined, finallyBlock: Block | undefined): TryStatement;
+ function createDebuggerStatement(): DebuggerStatement;
+ function createVariableDeclaration(name: string | BindingName, type?: TypeNode, initializer?: Expression): VariableDeclaration;
+ function updateVariableDeclaration(node: VariableDeclaration, name: BindingName, type: TypeNode | undefined, initializer: Expression | undefined): VariableDeclaration;
+ function createVariableDeclarationList(declarations: readonly VariableDeclaration[], flags?: NodeFlags): VariableDeclarationList;
+ function updateVariableDeclarationList(node: VariableDeclarationList, declarations: readonly VariableDeclaration[]): VariableDeclarationList;
+ function createFunctionDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): FunctionDeclaration;
+ function updateFunctionDeclaration(node: FunctionDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined): FunctionDeclaration;
+ function createClassDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration;
+ function updateClassDeclaration(node: ClassDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier | undefined, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly ClassElement[]): ClassDeclaration;
+ function createInterfaceDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration;
+ function updateInterfaceDeclaration(node: InterfaceDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, heritageClauses: readonly HeritageClause[] | undefined, members: readonly TypeElement[]): InterfaceDeclaration;
+ function createTypeAliasDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration;
+ function updateTypeAliasDeclaration(node: TypeAliasDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, typeParameters: readonly TypeParameterDeclaration[] | undefined, type: TypeNode): TypeAliasDeclaration;
+ function createEnumDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, members: readonly EnumMember[]): EnumDeclaration;
+ function updateEnumDeclaration(node: EnumDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, members: readonly EnumMember[]): EnumDeclaration;
+ function createModuleDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined, flags?: NodeFlags): ModuleDeclaration;
+ function updateModuleDeclaration(node: ModuleDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: ModuleName, body: ModuleBody | undefined): ModuleDeclaration;
+ function createModuleBlock(statements: readonly Statement[]): ModuleBlock;
+ function updateModuleBlock(node: ModuleBlock, statements: readonly Statement[]): ModuleBlock;
+ function createCaseBlock(clauses: readonly CaseOrDefaultClause[]): CaseBlock;
+ function updateCaseBlock(node: CaseBlock, clauses: readonly CaseOrDefaultClause[]): CaseBlock;
+ function createNamespaceExportDeclaration(name: string | Identifier): NamespaceExportDeclaration;
+ function updateNamespaceExportDeclaration(node: NamespaceExportDeclaration, name: Identifier): NamespaceExportDeclaration;
+ function createImportEqualsDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: string | Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration;
+ function updateImportEqualsDeclaration(node: ImportEqualsDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, name: Identifier, moduleReference: ModuleReference): ImportEqualsDeclaration;
+ function createImportDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression): ImportDeclaration;
+ function updateImportDeclaration(node: ImportDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, importClause: ImportClause | undefined, moduleSpecifier: Expression): ImportDeclaration;
+ function createImportClause(name: Identifier | undefined, namedBindings: NamedImportBindings | undefined, isTypeOnly?: boolean): ImportClause;
+ function updateImportClause(node: ImportClause, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined, isTypeOnly: boolean): ImportClause;
+ function createNamespaceImport(name: Identifier): NamespaceImport;
+ function createNamespaceExport(name: Identifier): NamespaceExport;
+ function updateNamespaceImport(node: NamespaceImport, name: Identifier): NamespaceImport;
+ function updateNamespaceExport(node: NamespaceExport, name: Identifier): NamespaceExport;
+ function createNamedImports(elements: readonly ImportSpecifier[]): NamedImports;
+ function updateNamedImports(node: NamedImports, elements: readonly ImportSpecifier[]): NamedImports;
+ function createImportSpecifier(propertyName: Identifier | undefined, name: Identifier): ImportSpecifier;
+ function updateImportSpecifier(node: ImportSpecifier, propertyName: Identifier | undefined, name: Identifier): ImportSpecifier;
+ function createExportAssignment(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, isExportEquals: boolean | undefined, expression: Expression): ExportAssignment;
+ function updateExportAssignment(node: ExportAssignment, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, expression: Expression): ExportAssignment;
+ function createExportDeclaration(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, exportClause: NamedExportBindings | undefined, moduleSpecifier?: Expression, isTypeOnly?: boolean): ExportDeclaration;
+ function updateExportDeclaration(node: ExportDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, exportClause: NamedExportBindings | undefined, moduleSpecifier: Expression | undefined, isTypeOnly: boolean): ExportDeclaration;
+ function createNamedExports(elements: readonly ExportSpecifier[]): NamedExports;
+ function updateNamedExports(node: NamedExports, elements: readonly ExportSpecifier[]): NamedExports;
+ function createExportSpecifier(propertyName: string | Identifier | undefined, name: string | Identifier): ExportSpecifier;
+ function updateExportSpecifier(node: ExportSpecifier, propertyName: Identifier | undefined, name: Identifier): ExportSpecifier;
+ function createExternalModuleReference(expression: Expression): ExternalModuleReference;
+ function updateExternalModuleReference(node: ExternalModuleReference, expression: Expression): ExternalModuleReference;
+ function createJsxElement(openingElement: JsxOpeningElement, children: readonly JsxChild[], closingElement: JsxClosingElement): JsxElement;
+ function updateJsxElement(node: JsxElement, openingElement: JsxOpeningElement, children: readonly JsxChild[], closingElement: JsxClosingElement): JsxElement;
+ function createJsxSelfClosingElement(tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxSelfClosingElement;
+ function updateJsxSelfClosingElement(node: JsxSelfClosingElement, tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxSelfClosingElement;
+ function createJsxOpeningElement(tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxOpeningElement;
+ function updateJsxOpeningElement(node: JsxOpeningElement, tagName: JsxTagNameExpression, typeArguments: readonly TypeNode[] | undefined, attributes: JsxAttributes): JsxOpeningElement;
+ function createJsxClosingElement(tagName: JsxTagNameExpression): JsxClosingElement;
+ function updateJsxClosingElement(node: JsxClosingElement, tagName: JsxTagNameExpression): JsxClosingElement;
+ function createJsxFragment(openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment): JsxFragment;
+ function createJsxText(text: string, containsOnlyTriviaWhiteSpaces?: boolean): JsxText;
+ function updateJsxText(node: JsxText, text: string, containsOnlyTriviaWhiteSpaces?: boolean): JsxText;
+ function createJsxOpeningFragment(): JsxOpeningFragment;
+ function createJsxJsxClosingFragment(): JsxClosingFragment;
+ function updateJsxFragment(node: JsxFragment, openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment): JsxFragment;
+ function createJsxAttribute(name: Identifier, initializer: StringLiteral | JsxExpression): JsxAttribute;
+ function updateJsxAttribute(node: JsxAttribute, name: Identifier, initializer: StringLiteral | JsxExpression): JsxAttribute;
+ function createJsxAttributes(properties: readonly JsxAttributeLike[]): JsxAttributes;
+ function updateJsxAttributes(node: JsxAttributes, properties: readonly JsxAttributeLike[]): JsxAttributes;
+ function createJsxSpreadAttribute(expression: Expression): JsxSpreadAttribute;
+ function updateJsxSpreadAttribute(node: JsxSpreadAttribute, expression: Expression): JsxSpreadAttribute;
+ function createJsxExpression(dotDotDotToken: DotDotDotToken | undefined, expression: Expression | undefined): JsxExpression;
+ function updateJsxExpression(node: JsxExpression, expression: Expression | undefined): JsxExpression;
+ function createCaseClause(expression: Expression, statements: readonly Statement[]): CaseClause;
+ function updateCaseClause(node: CaseClause, expression: Expression, statements: readonly Statement[]): CaseClause;
+ function createDefaultClause(statements: readonly Statement[]): DefaultClause;
+ function updateDefaultClause(node: DefaultClause, statements: readonly Statement[]): DefaultClause;
+ function createHeritageClause(token: HeritageClause["token"], types: readonly ExpressionWithTypeArguments[]): HeritageClause;
+ function updateHeritageClause(node: HeritageClause, types: readonly ExpressionWithTypeArguments[]): HeritageClause;
+ function createCatchClause(variableDeclaration: string | VariableDeclaration | undefined, block: Block): CatchClause;
+ function updateCatchClause(node: CatchClause, variableDeclaration: VariableDeclaration | undefined, block: Block): CatchClause;
+ function createPropertyAssignment(name: string | PropertyName, initializer: Expression): PropertyAssignment;
+ function updatePropertyAssignment(node: PropertyAssignment, name: PropertyName, initializer: Expression): PropertyAssignment;
+ function createShorthandPropertyAssignment(name: string | Identifier, objectAssignmentInitializer?: Expression): ShorthandPropertyAssignment;
+ function updateShorthandPropertyAssignment(node: ShorthandPropertyAssignment, name: Identifier, objectAssignmentInitializer: Expression | undefined): ShorthandPropertyAssignment;
+ function createSpreadAssignment(expression: Expression): SpreadAssignment;
+ function updateSpreadAssignment(node: SpreadAssignment, expression: Expression): SpreadAssignment;
+ function createEnumMember(name: string | PropertyName, initializer?: Expression): EnumMember;
+ function updateEnumMember(node: EnumMember, name: PropertyName, initializer: Expression | undefined): EnumMember;
+ function updateSourceFileNode(node: SourceFile, statements: readonly Statement[], isDeclarationFile?: boolean, referencedFiles?: SourceFile["referencedFiles"], typeReferences?: SourceFile["typeReferenceDirectives"], hasNoDefaultLib?: boolean, libReferences?: SourceFile["libReferenceDirectives"]): SourceFile;
+ /**
+ * Creates a shallow, memberwise clone of a node for mutation.
+ */
+ function getMutableClone<T extends Node>(node: T): T;
+ /**
+ * Creates a synthetic statement to act as a placeholder for a not-emitted statement in
+ * order to preserve comments.
+ *
+ * @param original The original statement.
+ */
+ function createNotEmittedStatement(original: Node): NotEmittedStatement;
+ /**
+ * Creates a synthetic expression to act as a placeholder for a not-emitted expression in
+ * order to preserve comments or sourcemap positions.
+ *
+ * @param expression The inner expression to emit.
+ * @param original The original outer expression.
+ * @param location The location for the expression. Defaults to the positions from "original" if provided.
+ */
+ function createPartiallyEmittedExpression(expression: Expression, original?: Node): PartiallyEmittedExpression;
+ function updatePartiallyEmittedExpression(node: PartiallyEmittedExpression, expression: Expression): PartiallyEmittedExpression;
+ function createCommaList(elements: readonly Expression[]): CommaListExpression;
+ function updateCommaList(node: CommaListExpression, elements: readonly Expression[]): CommaListExpression;
+ function createBundle(sourceFiles: readonly SourceFile[], prepends?: readonly (UnparsedSource | InputFiles)[]): Bundle;
+ function createUnparsedSourceFile(text: string): UnparsedSource;
+ function createUnparsedSourceFile(inputFile: InputFiles, type: "js" | "dts", stripInternal?: boolean): UnparsedSource;
+ function createUnparsedSourceFile(text: string, mapPath: string | undefined, map: string | undefined): UnparsedSource;
+ function createInputFiles(javascriptText: string, declarationText: string): InputFiles;
+ function createInputFiles(readFileText: (path: string) => string | undefined, javascriptPath: string, javascriptMapPath: string | undefined, declarationPath: string, declarationMapPath: string | undefined, buildInfoPath: string | undefined): InputFiles;
+ function createInputFiles(javascriptText: string, declarationText: string, javascriptMapPath: string | undefined, javascriptMapText: string | undefined, declarationMapPath: string | undefined, declarationMapText: string | undefined): InputFiles;
+ function updateBundle(node: Bundle, sourceFiles: readonly SourceFile[], prepends?: readonly (UnparsedSource | InputFiles)[]): Bundle;
+ function createImmediatelyInvokedFunctionExpression(statements: readonly Statement[]): CallExpression;
+ function createImmediatelyInvokedFunctionExpression(statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression;
+ function createImmediatelyInvokedArrowFunction(statements: readonly Statement[]): CallExpression;
+ function createImmediatelyInvokedArrowFunction(statements: readonly Statement[], param: ParameterDeclaration, paramValue: Expression): CallExpression;
+ function createComma(left: Expression, right: Expression): Expression;
+ function createLessThan(left: Expression, right: Expression): Expression;
+ function createAssignment(left: ObjectLiteralExpression | ArrayLiteralExpression, right: Expression): DestructuringAssignment;
+ function createAssignment(left: Expression, right: Expression): BinaryExpression;
+ function createStrictEquality(left: Expression, right: Expression): BinaryExpression;
+ function createStrictInequality(left: Expression, right: Expression): BinaryExpression;
+ function createAdd(left: Expression, right: Expression): BinaryExpression;
+ function createSubtract(left: Expression, right: Expression): BinaryExpression;
+ function createPostfixIncrement(operand: Expression): PostfixUnaryExpression;
+ function createLogicalAnd(left: Expression, right: Expression): BinaryExpression;
+ function createLogicalOr(left: Expression, right: Expression): BinaryExpression;
+ function createNullishCoalesce(left: Expression, right: Expression): BinaryExpression;
+ function createLogicalNot(operand: Expression): PrefixUnaryExpression;
+ function createVoidZero(): VoidExpression;
+ function createExportDefault(expression: Expression): ExportAssignment;
+ function createExternalModuleExport(exportName: Identifier): ExportDeclaration;
+ /**
+ * Clears any EmitNode entries from parse-tree nodes.
+ * @param sourceFile A source file.
+ */
+ function disposeEmitNodes(sourceFile: SourceFile): void;
+ function setTextRange<T extends TextRange>(range: T, location: TextRange | undefined): T;
+ /**
+ * Sets flags that control emit behavior of a node.
+ */
+ function setEmitFlags<T extends Node>(node: T, emitFlags: EmitFlags): T;
+ /**
+ * Gets a custom text range to use when emitting source maps.
+ */
+ function getSourceMapRange(node: Node): SourceMapRange;
+ /**
+ * Sets a custom text range to use when emitting source maps.
+ */
+ function setSourceMapRange<T extends Node>(node: T, range: SourceMapRange | undefined): T;
+ /**
+ * Create an external source map source file reference
+ */
+ function createSourceMapSource(fileName: string, text: string, skipTrivia?: (pos: number) => number): SourceMapSource;
+ /**
+ * Gets the TextRange to use for source maps for a token of a node.
+ */
+ function getTokenSourceMapRange(node: Node, token: SyntaxKind): SourceMapRange | undefined;
+ /**
+ * Sets the TextRange to use for source maps for a token of a node.
+ */
+ function setTokenSourceMapRange<T extends Node>(node: T, token: SyntaxKind, range: SourceMapRange | undefined): T;
+ /**
+ * Gets a custom text range to use when emitting comments.
+ */
+ function getCommentRange(node: Node): TextRange;
+ /**
+ * Sets a custom text range to use when emitting comments.
+ */
+ function setCommentRange<T extends Node>(node: T, range: TextRange): T;
+ function getSyntheticLeadingComments(node: Node): SynthesizedComment[] | undefined;
+ function setSyntheticLeadingComments<T extends Node>(node: T, comments: SynthesizedComment[] | undefined): T;
+ function addSyntheticLeadingComment<T extends Node>(node: T, kind: SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia, text: string, hasTrailingNewLine?: boolean): T;
+ function getSyntheticTrailingComments(node: Node): SynthesizedComment[] | undefined;
+ function setSyntheticTrailingComments<T extends Node>(node: T, comments: SynthesizedComment[] | undefined): T;
+ function addSyntheticTrailingComment<T extends Node>(node: T, kind: SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia, text: string, hasTrailingNewLine?: boolean): T;
+ function moveSyntheticComments<T extends Node>(node: T, original: Node): T;
+ /**
+ * Gets the constant value to emit for an expression.
+ */
+ function getConstantValue(node: PropertyAccessExpression | ElementAccessExpression): string | number | undefined;
+ /**
+ * Sets the constant value to emit for an expression.
+ */
+ function setConstantValue(node: PropertyAccessExpression | ElementAccessExpression, value: string | number): PropertyAccessExpression | ElementAccessExpression;
+ /**
+ * Adds an EmitHelper to a node.
+ */
+ function addEmitHelper<T extends Node>(node: T, helper: EmitHelper): T;
+ /**
+ * Add EmitHelpers to a node.
+ */
+ function addEmitHelpers<T extends Node>(node: T, helpers: EmitHelper[] | undefined): T;
+ /**
+ * Removes an EmitHelper from a node.
+ */
+ function removeEmitHelper(node: Node, helper: EmitHelper): boolean;
+ /**
+ * Gets the EmitHelpers of a node.
+ */
+ function getEmitHelpers(node: Node): EmitHelper[] | undefined;
+ /**
+ * Moves matching emit helpers from a source node to a target node.
+ */
+ function moveEmitHelpers(source: Node, target: Node, predicate: (helper: EmitHelper) => boolean): void;
+ function setOriginalNode<T extends Node>(node: T, original: Node | undefined): T;
+}
+declare namespace ts {
+ /**
+ * Visits a Node using the supplied visitor, possibly returning a new Node in its place.
+ *
+ * @param node The Node to visit.
+ * @param visitor The callback used to visit the Node.
+ * @param test A callback to execute to verify the Node is valid.
+ * @param lift An optional callback to execute to lift a NodeArray into a valid Node.
+ */
+ function visitNode<T extends Node>(node: T | undefined, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: NodeArray<Node>) => T): T;
+ /**
+ * Visits a Node using the supplied visitor, possibly returning a new Node in its place.
+ *
+ * @param node The Node to visit.
+ * @param visitor The callback used to visit the Node.
+ * @param test A callback to execute to verify the Node is valid.
+ * @param lift An optional callback to execute to lift a NodeArray into a valid Node.
+ */
+ function visitNode<T extends Node>(node: T | undefined, visitor: Visitor | undefined, test?: (node: Node) => boolean, lift?: (node: NodeArray<Node>) => T): T | undefined;
+ /**
+ * Visits a NodeArray using the supplied visitor, possibly returning a new NodeArray in its place.
+ *
+ * @param nodes The NodeArray to visit.
+ * @param visitor The callback used to visit a Node.
+ * @param test A node test to execute for each node.
+ * @param start An optional value indicating the starting offset at which to start visiting.
+ * @param count An optional value indicating the maximum number of nodes to visit.
+ */
+ function visitNodes<T extends Node>(nodes: NodeArray<T> | undefined, visitor: Visitor, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray<T>;
+ /**
+ * Visits a NodeArray using the supplied visitor, possibly returning a new NodeArray in its place.
+ *
+ * @param nodes The NodeArray to visit.
+ * @param visitor The callback used to visit a Node.
+ * @param test A node test to execute for each node.
+ * @param start An optional value indicating the starting offset at which to start visiting.
+ * @param count An optional value indicating the maximum number of nodes to visit.
+ */
+ function visitNodes<T extends Node>(nodes: NodeArray<T> | undefined, visitor: Visitor, test?: (node: Node) => boolean, start?: number, count?: number): NodeArray<T> | undefined;
+ /**
+ * Starts a new lexical environment and visits a statement list, ending the lexical environment
+ * and merging hoisted declarations upon completion.
+ */
+ function visitLexicalEnvironment(statements: NodeArray<Statement>, visitor: Visitor, context: TransformationContext, start?: number, ensureUseStrict?: boolean): NodeArray<Statement>;
+ /**
+ * Starts a new lexical environment and visits a parameter list, suspending the lexical
+ * environment upon completion.
+ */
+ function visitParameterList(nodes: NodeArray<ParameterDeclaration>, visitor: Visitor, context: TransformationContext, nodesVisitor?: <T extends Node>(nodes: NodeArray<T>, visitor: Visitor, test?: (node: Node) => boolean, start?: number, count?: number) => NodeArray<T>): NodeArray<ParameterDeclaration>;
+ function visitParameterList(nodes: NodeArray<ParameterDeclaration> | undefined, visitor: Visitor, context: TransformationContext, nodesVisitor?: <T extends Node>(nodes: NodeArray<T> | undefined, visitor: Visitor, test?: (node: Node) => boolean, start?: number, count?: number) => NodeArray<T> | undefined): NodeArray<ParameterDeclaration> | undefined;
+ /**
+ * Resumes a suspended lexical environment and visits a function body, ending the lexical
+ * environment and merging hoisted declarations upon completion.
+ */
+ function visitFunctionBody(node: FunctionBody, visitor: Visitor, context: TransformationContext): FunctionBody;
+ /**
+ * Resumes a suspended lexical environment and visits a function body, ending the lexical
+ * environment and merging hoisted declarations upon completion.
+ */
+ function visitFunctionBody(node: FunctionBody | undefined, visitor: Visitor, context: TransformationContext): FunctionBody | undefined;
+ /**
+ * Resumes a suspended lexical environment and visits a concise body, ending the lexical
+ * environment and merging hoisted declarations upon completion.
+ */
+ function visitFunctionBody(node: ConciseBody, visitor: Visitor, context: TransformationContext): ConciseBody;
+ /**
+ * Visits each child of a Node using the supplied visitor, possibly returning a new Node of the same kind in its place.
+ *
+ * @param node The Node whose children will be visited.
+ * @param visitor The callback used to visit each child.
+ * @param context A lexical environment context for the visitor.
+ */
+ function visitEachChild<T extends Node>(node: T, visitor: Visitor, context: TransformationContext): T;
+ /**
+ * Visits each child of a Node using the supplied visitor, possibly returning a new Node of the same kind in its place.
+ *
+ * @param node The Node whose children will be visited.
+ * @param visitor The callback used to visit each child.
+ * @param context A lexical environment context for the visitor.
+ */
+ function visitEachChild<T extends Node>(node: T | undefined, visitor: Visitor, context: TransformationContext, nodesVisitor?: typeof visitNodes, tokenVisitor?: Visitor): T | undefined;
+}
+declare namespace ts {
+ function getTsBuildInfoEmitOutputFilePath(options: CompilerOptions): string | undefined;
+ function getOutputFileNames(commandLine: ParsedCommandLine, inputFileName: string, ignoreCase: boolean): readonly string[];
+ function createPrinter(printerOptions?: PrinterOptions, handlers?: PrintHandlers): Printer;
+}
+declare namespace ts {
+ export function findConfigFile(searchPath: string, fileExists: (fileName: string) => boolean, configName?: string): string | undefined;
+ export function resolveTripleslashReference(moduleName: string, containingFile: string): string;
+ export function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost;
+ export function getPreEmitDiagnostics(program: Program, sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[];
+ export interface FormatDiagnosticsHost {
+ getCurrentDirectory(): string;
+ getCanonicalFileName(fileName: string): string;
+ getNewLine(): string;
+ }
+ export function formatDiagnostics(diagnostics: readonly Diagnostic[], host: FormatDiagnosticsHost): string;
+ export function formatDiagnostic(diagnostic: Diagnostic, host: FormatDiagnosticsHost): string;
+ export function formatDiagnosticsWithColorAndContext(diagnostics: readonly Diagnostic[], host: FormatDiagnosticsHost): string;
+ export function flattenDiagnosticMessageText(diag: string | DiagnosticMessageChain | undefined, newLine: string, indent?: number): string;
+ export function getConfigFileParsingDiagnostics(configFileParseResult: ParsedCommandLine): readonly Diagnostic[];
+ /**
+ * Create a new 'Program' instance. A Program is an immutable collection of 'SourceFile's and a 'CompilerOptions'
+ * that represent a compilation unit.
+ *
+ * Creating a program proceeds from a set of root files, expanding the set of inputs by following imports and
+ * triple-slash-reference-path directives transitively. '@types' and triple-slash-reference-types are also pulled in.
+ *
+ * @param createProgramOptions - The options for creating a program.
+ * @returns A 'Program' object.
+ */
+ export function createProgram(createProgramOptions: CreateProgramOptions): Program;
+ /**
+ * Create a new 'Program' instance. A Program is an immutable collection of 'SourceFile's and a 'CompilerOptions'
+ * that represent a compilation unit.
+ *
+ * Creating a program proceeds from a set of root files, expanding the set of inputs by following imports and
+ * triple-slash-reference-path directives transitively. '@types' and triple-slash-reference-types are also pulled in.
+ *
+ * @param rootNames - A set of root files.
+ * @param options - The compiler options which should be used.
+ * @param host - The host interacts with the underlying file system.
+ * @param oldProgram - Reuses an old program structure.
+ * @param configFileParsingDiagnostics - error during config file parsing
+ * @returns A 'Program' object.
+ */
+ export function createProgram(rootNames: readonly string[], options: CompilerOptions, host?: CompilerHost, oldProgram?: Program, configFileParsingDiagnostics?: readonly Diagnostic[]): Program;
+ /** @deprecated */ export interface ResolveProjectReferencePathHost {
+ fileExists(fileName: string): boolean;
+ }
+ /**
+ * Returns the target config filename of a project reference.
+ * Note: The file might not exist.
+ */
+ export function resolveProjectReferencePath(ref: ProjectReference): ResolvedConfigFileName;
+ /** @deprecated */ export function resolveProjectReferencePath(host: ResolveProjectReferencePathHost, ref: ProjectReference): ResolvedConfigFileName;
+ export {};
+}
+declare namespace ts {
+ interface EmitOutput {
+ outputFiles: OutputFile[];
+ emitSkipped: boolean;
+ }
+ interface OutputFile {
+ name: string;
+ writeByteOrderMark: boolean;
+ text: string;
+ }
+}
+declare namespace ts {
+ type AffectedFileResult<T> = {
+ result: T;
+ affected: SourceFile | Program;
+ } | undefined;
+ interface BuilderProgramHost {
+ /**
+ * return true if file names are treated with case sensitivity
+ */
+ useCaseSensitiveFileNames(): boolean;
+ /**
+ * If provided this would be used this hash instead of actual file shape text for detecting changes
+ */
+ createHash?: (data: string) => string;
+ /**
+ * When emit or emitNextAffectedFile are called without writeFile,
+ * this callback if present would be used to write files
+ */
+ writeFile?: WriteFileCallback;
+ }
+ /**
+ * Builder to manage the program state changes
+ */
+ interface BuilderProgram {
+ /**
+ * Returns current program
+ */
+ getProgram(): Program;
+ /**
+ * Get compiler options of the program
+ */
+ getCompilerOptions(): CompilerOptions;
+ /**
+ * Get the source file in the program with file name
+ */
+ getSourceFile(fileName: string): SourceFile | undefined;
+ /**
+ * Get a list of files in the program
+ */
+ getSourceFiles(): readonly SourceFile[];
+ /**
+ * Get the diagnostics for compiler options
+ */
+ getOptionsDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[];
+ /**
+ * Get the diagnostics that dont belong to any file
+ */
+ getGlobalDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[];
+ /**
+ * Get the diagnostics from config file parsing
+ */
+ getConfigFileParsingDiagnostics(): readonly Diagnostic[];
+ /**
+ * Get the syntax diagnostics, for all source files if source file is not supplied
+ */
+ getSyntacticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[];
+ /**
+ * Get the declaration diagnostics, for all source files if source file is not supplied
+ */
+ getDeclarationDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly DiagnosticWithLocation[];
+ /**
+ * Get all the dependencies of the file
+ */
+ getAllDependencies(sourceFile: SourceFile): readonly string[];
+ /**
+ * Gets the semantic diagnostics from the program corresponding to this state of file (if provided) or whole program
+ * The semantic diagnostics are cached and managed here
+ * Note that it is assumed that when asked about semantic diagnostics through this API,
+ * the file has been taken out of affected files so it is safe to use cache or get from program and cache the diagnostics
+ * In case of SemanticDiagnosticsBuilderProgram if the source file is not provided,
+ * it will iterate through all the affected files, to ensure that cache stays valid and yet provide a way to get all semantic diagnostics
+ */
+ getSemanticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[];
+ /**
+ * Emits the JavaScript and declaration files.
+ * When targetSource file is specified, emits the files corresponding to that source file,
+ * otherwise for the whole program.
+ * In case of EmitAndSemanticDiagnosticsBuilderProgram, when targetSourceFile is specified,
+ * it is assumed that that file is handled from affected file list. If targetSourceFile is not specified,
+ * it will only emit all the affected files instead of whole program
+ *
+ * The first of writeFile if provided, writeFile of BuilderProgramHost if provided, writeFile of compiler host
+ * in that order would be used to write the files
+ */
+ emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): EmitResult;
+ /**
+ * Get the current directory of the program
+ */
+ getCurrentDirectory(): string;
+ }
+ /**
+ * The builder that caches the semantic diagnostics for the program and handles the changed files and affected files
+ */
+ interface SemanticDiagnosticsBuilderProgram extends BuilderProgram {
+ /**
+ * Gets the semantic diagnostics from the program for the next affected file and caches it
+ * Returns undefined if the iteration is complete
+ */
+ getSemanticDiagnosticsOfNextAffectedFile(cancellationToken?: CancellationToken, ignoreSourceFile?: (sourceFile: SourceFile) => boolean): AffectedFileResult<readonly Diagnostic[]>;
+ }
+ /**
+ * The builder that can handle the changes in program and iterate through changed file to emit the files
+ * The semantic diagnostics are cached per file and managed by clearing for the changed/affected files
+ */
+ interface EmitAndSemanticDiagnosticsBuilderProgram extends SemanticDiagnosticsBuilderProgram {
+ /**
+ * Emits the next affected file's emit result (EmitResult and sourceFiles emitted) or returns undefined if iteration is complete
+ * The first of writeFile if provided, writeFile of BuilderProgramHost if provided, writeFile of compiler host
+ * in that order would be used to write the files
+ */
+ emitNextAffectedFile(writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): AffectedFileResult<EmitResult>;
+ }
+ /**
+ * Create the builder to manage semantic diagnostics and cache them
+ */
+ function createSemanticDiagnosticsBuilderProgram(newProgram: Program, host: BuilderProgramHost, oldProgram?: SemanticDiagnosticsBuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[]): SemanticDiagnosticsBuilderProgram;
+ function createSemanticDiagnosticsBuilderProgram(rootNames: readonly string[] | undefined, options: CompilerOptions | undefined, host?: CompilerHost, oldProgram?: SemanticDiagnosticsBuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[], projectReferences?: readonly ProjectReference[]): SemanticDiagnosticsBuilderProgram;
+ /**
+ * Create the builder that can handle the changes in program and iterate through changed files
+ * to emit the those files and manage semantic diagnostics cache as well
+ */
+ function createEmitAndSemanticDiagnosticsBuilderProgram(newProgram: Program, host: BuilderProgramHost, oldProgram?: EmitAndSemanticDiagnosticsBuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[]): EmitAndSemanticDiagnosticsBuilderProgram;
+ function createEmitAndSemanticDiagnosticsBuilderProgram(rootNames: readonly string[] | undefined, options: CompilerOptions | undefined, host?: CompilerHost, oldProgram?: EmitAndSemanticDiagnosticsBuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[], projectReferences?: readonly ProjectReference[]): EmitAndSemanticDiagnosticsBuilderProgram;
+ /**
+ * Creates a builder thats just abstraction over program and can be used with watch
+ */
+ function createAbstractBuilder(newProgram: Program, host: BuilderProgramHost, oldProgram?: BuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[]): BuilderProgram;
+ function createAbstractBuilder(rootNames: readonly string[] | undefined, options: CompilerOptions | undefined, host?: CompilerHost, oldProgram?: BuilderProgram, configFileParsingDiagnostics?: readonly Diagnostic[], projectReferences?: readonly ProjectReference[]): BuilderProgram;
+}
+declare namespace ts {
+ interface ReadBuildProgramHost {
+ useCaseSensitiveFileNames(): boolean;
+ getCurrentDirectory(): string;
+ readFile(fileName: string): string | undefined;
+ }
+ function readBuilderProgram(compilerOptions: CompilerOptions, host: ReadBuildProgramHost): EmitAndSemanticDiagnosticsBuilderProgram | undefined;
+ function createIncrementalCompilerHost(options: CompilerOptions, system?: System): CompilerHost;
+ interface IncrementalProgramOptions<T extends BuilderProgram> {
+ rootNames: readonly string[];
+ options: CompilerOptions;
+ configFileParsingDiagnostics?: readonly Diagnostic[];
+ projectReferences?: readonly ProjectReference[];
+ host?: CompilerHost;
+ createProgram?: CreateProgram<T>;
+ }
+ function createIncrementalProgram<T extends BuilderProgram = EmitAndSemanticDiagnosticsBuilderProgram>({ rootNames, options, configFileParsingDiagnostics, projectReferences, host, createProgram }: IncrementalProgramOptions<T>): T;
+ type WatchStatusReporter = (diagnostic: Diagnostic, newLine: string, options: CompilerOptions, errorCount?: number) => void;
+ /** Create the program with rootNames and options, if they are undefined, oldProgram and new configFile diagnostics create new program */
+ type CreateProgram<T extends BuilderProgram> = (rootNames: readonly string[] | undefined, options: CompilerOptions | undefined, host?: CompilerHost, oldProgram?: T, configFileParsingDiagnostics?: readonly Diagnostic[], projectReferences?: readonly ProjectReference[] | undefined) => T;
+ /** Host that has watch functionality used in --watch mode */
+ interface WatchHost {
+ /** If provided, called with Diagnostic message that informs about change in watch status */
+ onWatchStatusChange?(diagnostic: Diagnostic, newLine: string, options: CompilerOptions, errorCount?: number): void;
+ /** Used to watch changes in source files, missing files needed to update the program or config file */
+ watchFile(path: string, callback: FileWatcherCallback, pollingInterval?: number, options?: CompilerOptions): FileWatcher;
+ /** Used to watch resolved module's failed lookup locations, config file specs, type roots where auto type reference directives are added */
+ watchDirectory(path: string, callback: DirectoryWatcherCallback, recursive?: boolean, options?: CompilerOptions): FileWatcher;
+ /** If provided, will be used to set delayed compilation, so that multiple changes in short span are compiled together */
+ setTimeout?(callback: (...args: any[]) => void, ms: number, ...args: any[]): any;
+ /** If provided, will be used to reset existing delayed compilation */
+ clearTimeout?(timeoutId: any): void;
+ }
+ interface ProgramHost<T extends BuilderProgram> {
+ /**
+ * Used to create the program when need for program creation or recreation detected
+ */
+ createProgram: CreateProgram<T>;
+ useCaseSensitiveFileNames(): boolean;
+ getNewLine(): string;
+ getCurrentDirectory(): string;
+ getDefaultLibFileName(options: CompilerOptions): string;
+ getDefaultLibLocation?(): string;
+ createHash?(data: string): string;
+ /**
+ * Use to check file presence for source files and
+ * if resolveModuleNames is not provided (complier is in charge of module resolution) then module files as well
+ */
+ fileExists(path: string): boolean;
+ /**
+ * Use to read file text for source files and
+ * if resolveModuleNames is not provided (complier is in charge of module resolution) then module files as well
+ */
+ readFile(path: string, encoding?: string): string | undefined;
+ /** If provided, used for module resolution as well as to handle directory structure */
+ directoryExists?(path: string): boolean;
+ /** If provided, used in resolutions as well as handling directory structure */
+ getDirectories?(path: string): string[];
+ /** If provided, used to cache and handle directory structure modifications */
+ readDirectory?(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[];
+ /** Symbol links resolution */
+ realpath?(path: string): string;
+ /** If provided would be used to write log about compilation */
+ trace?(s: string): void;
+ /** If provided is used to get the environment variable */
+ getEnvironmentVariable?(name: string): string | undefined;
+ /** If provided, used to resolve the module names, otherwise typescript's default module resolution */
+ resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions): (ResolvedModule | undefined)[];
+ /** If provided, used to resolve type reference directives, otherwise typescript's default resolution */
+ resolveTypeReferenceDirectives?(typeReferenceDirectiveNames: string[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions): (ResolvedTypeReferenceDirective | undefined)[];
+ }
+ interface WatchCompilerHost<T extends BuilderProgram> extends ProgramHost<T>, WatchHost {
+ /** Instead of using output d.ts file from project reference, use its source file */
+ useSourceOfProjectReferenceRedirect?(): boolean;
+ /** If provided, callback to invoke after every new program creation */
+ afterProgramCreate?(program: T): void;
+ }
+ /**
+ * Host to create watch with root files and options
+ */
+ interface WatchCompilerHostOfFilesAndCompilerOptions<T extends BuilderProgram> extends WatchCompilerHost<T> {
+ /** root files to use to generate program */
+ rootFiles: string[];
+ /** Compiler options */
+ options: CompilerOptions;
+ watchOptions?: WatchOptions;
+ /** Project References */
+ projectReferences?: readonly ProjectReference[];
+ }
+ /**
+ * Host to create watch with config file
+ */
+ interface WatchCompilerHostOfConfigFile<T extends BuilderProgram> extends WatchCompilerHost<T>, ConfigFileDiagnosticsReporter {
+ /** Name of the config file to compile */
+ configFileName: string;
+ /** Options to extend */
+ optionsToExtend?: CompilerOptions;
+ watchOptionsToExtend?: WatchOptions;
+ extraFileExtensions?: readonly FileExtensionInfo[];
+ /**
+ * Used to generate source file names from the config file and its include, exclude, files rules
+ * and also to cache the directory stucture
+ */
+ readDirectory(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[];
+ }
+ interface Watch<T> {
+ /** Synchronize with host and get updated program */
+ getProgram(): T;
+ /** Closes the watch */
+ close(): void;
+ }
+ /**
+ * Creates the watch what generates program using the config file
+ */
+ interface WatchOfConfigFile<T> extends Watch<T> {
+ }
+ /**
+ * Creates the watch that generates program using the root files and compiler options
+ */
+ interface WatchOfFilesAndCompilerOptions<T> extends Watch<T> {
+ /** Updates the root files in the program, only if this is not config file compilation */
+ updateRootFileNames(fileNames: string[]): void;
+ }
+ /**
+ * Create the watch compiler host for either configFile or fileNames and its options
+ */
+ function createWatchCompilerHost<T extends BuilderProgram>(configFileName: string, optionsToExtend: CompilerOptions | undefined, system: System, createProgram?: CreateProgram<T>, reportDiagnostic?: DiagnosticReporter, reportWatchStatus?: WatchStatusReporter, watchOptionsToExtend?: WatchOptions, extraFileExtensions?: readonly FileExtensionInfo[]): WatchCompilerHostOfConfigFile<T>;
+ function createWatchCompilerHost<T extends BuilderProgram>(rootFiles: string[], options: CompilerOptions, system: System, createProgram?: CreateProgram<T>, reportDiagnostic?: DiagnosticReporter, reportWatchStatus?: WatchStatusReporter, projectReferences?: readonly ProjectReference[], watchOptions?: WatchOptions): WatchCompilerHostOfFilesAndCompilerOptions<T>;
+ /**
+ * Creates the watch from the host for root files and compiler options
+ */
+ function createWatchProgram<T extends BuilderProgram>(host: WatchCompilerHostOfFilesAndCompilerOptions<T>): WatchOfFilesAndCompilerOptions<T>;
+ /**
+ * Creates the watch from the host for config file
+ */
+ function createWatchProgram<T extends BuilderProgram>(host: WatchCompilerHostOfConfigFile<T>): WatchOfConfigFile<T>;
+}
+declare namespace ts {
+ interface BuildOptions {
+ dry?: boolean;
+ force?: boolean;
+ verbose?: boolean;
+ incremental?: boolean;
+ assumeChangesOnlyAffectDirectDependencies?: boolean;
+ traceResolution?: boolean;
+ [option: string]: CompilerOptionsValue | undefined;
+ }
+ type ReportEmitErrorSummary = (errorCount: number) => void;
+ interface SolutionBuilderHostBase<T extends BuilderProgram> extends ProgramHost<T> {
+ createDirectory?(path: string): void;
+ /**
+ * Should provide create directory and writeFile if done of invalidatedProjects is not invoked with
+ * writeFileCallback
+ */
+ writeFile?(path: string, data: string, writeByteOrderMark?: boolean): void;
+ getModifiedTime(fileName: string): Date | undefined;
+ setModifiedTime(fileName: string, date: Date): void;
+ deleteFile(fileName: string): void;
+ getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined;
+ reportDiagnostic: DiagnosticReporter;
+ reportSolutionBuilderStatus: DiagnosticReporter;
+ afterProgramEmitAndDiagnostics?(program: T): void;
+ }
+ interface SolutionBuilderHost<T extends BuilderProgram> extends SolutionBuilderHostBase<T> {
+ reportErrorSummary?: ReportEmitErrorSummary;
+ }
+ interface SolutionBuilderWithWatchHost<T extends BuilderProgram> extends SolutionBuilderHostBase<T>, WatchHost {
+ }
+ interface SolutionBuilder<T extends BuilderProgram> {
+ build(project?: string, cancellationToken?: CancellationToken): ExitStatus;
+ clean(project?: string): ExitStatus;
+ buildReferences(project: string, cancellationToken?: CancellationToken): ExitStatus;
+ cleanReferences(project?: string): ExitStatus;
+ getNextInvalidatedProject(cancellationToken?: CancellationToken): InvalidatedProject<T> | undefined;
+ }
+ /**
+ * Create a function that reports watch status by writing to the system and handles the formating of the diagnostic
+ */
+ function createBuilderStatusReporter(system: System, pretty?: boolean): DiagnosticReporter;
+ function createSolutionBuilderHost<T extends BuilderProgram = EmitAndSemanticDiagnosticsBuilderProgram>(system?: System, createProgram?: CreateProgram<T>, reportDiagnostic?: DiagnosticReporter, reportSolutionBuilderStatus?: DiagnosticReporter, reportErrorSummary?: ReportEmitErrorSummary): SolutionBuilderHost<T>;
+ function createSolutionBuilderWithWatchHost<T extends BuilderProgram = EmitAndSemanticDiagnosticsBuilderProgram>(system?: System, createProgram?: CreateProgram<T>, reportDiagnostic?: DiagnosticReporter, reportSolutionBuilderStatus?: DiagnosticReporter, reportWatchStatus?: WatchStatusReporter): SolutionBuilderWithWatchHost<T>;
+ function createSolutionBuilder<T extends BuilderProgram>(host: SolutionBuilderHost<T>, rootNames: readonly string[], defaultOptions: BuildOptions): SolutionBuilder<T>;
+ function createSolutionBuilderWithWatch<T extends BuilderProgram>(host: SolutionBuilderWithWatchHost<T>, rootNames: readonly string[], defaultOptions: BuildOptions, baseWatchOptions?: WatchOptions): SolutionBuilder<T>;
+ enum InvalidatedProjectKind {
+ Build = 0,
+ UpdateBundle = 1,
+ UpdateOutputFileStamps = 2
+ }
+ interface InvalidatedProjectBase {
+ readonly kind: InvalidatedProjectKind;
+ readonly project: ResolvedConfigFileName;
+ /**
+ * To dispose this project and ensure that all the necessary actions are taken and state is updated accordingly
+ */
+ done(cancellationToken?: CancellationToken, writeFile?: WriteFileCallback, customTransformers?: CustomTransformers): ExitStatus;
+ getCompilerOptions(): CompilerOptions;
+ getCurrentDirectory(): string;
+ }
+ interface UpdateOutputFileStampsProject extends InvalidatedProjectBase {
+ readonly kind: InvalidatedProjectKind.UpdateOutputFileStamps;
+ updateOutputFileStatmps(): void;
+ }
+ interface BuildInvalidedProject<T extends BuilderProgram> extends InvalidatedProjectBase {
+ readonly kind: InvalidatedProjectKind.Build;
+ getBuilderProgram(): T | undefined;
+ getProgram(): Program | undefined;
+ getSourceFile(fileName: string): SourceFile | undefined;
+ getSourceFiles(): readonly SourceFile[];
+ getOptionsDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[];
+ getGlobalDiagnostics(cancellationToken?: CancellationToken): readonly Diagnostic[];
+ getConfigFileParsingDiagnostics(): readonly Diagnostic[];
+ getSyntacticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[];
+ getAllDependencies(sourceFile: SourceFile): readonly string[];
+ getSemanticDiagnostics(sourceFile?: SourceFile, cancellationToken?: CancellationToken): readonly Diagnostic[];
+ getSemanticDiagnosticsOfNextAffectedFile(cancellationToken?: CancellationToken, ignoreSourceFile?: (sourceFile: SourceFile) => boolean): AffectedFileResult<readonly Diagnostic[]>;
+ emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): EmitResult | undefined;
+ }
+ interface UpdateBundleProject<T extends BuilderProgram> extends InvalidatedProjectBase {
+ readonly kind: InvalidatedProjectKind.UpdateBundle;
+ emit(writeFile?: WriteFileCallback, customTransformers?: CustomTransformers): EmitResult | BuildInvalidedProject<T> | undefined;
+ }
+ type InvalidatedProject<T extends BuilderProgram> = UpdateOutputFileStampsProject | BuildInvalidedProject<T> | UpdateBundleProject<T>;
+}
+declare namespace ts.server {
+ type ActionSet = "action::set";
+ type ActionInvalidate = "action::invalidate";
+ type ActionPackageInstalled = "action::packageInstalled";
+ type EventTypesRegistry = "event::typesRegistry";
+ type EventBeginInstallTypes = "event::beginInstallTypes";
+ type EventEndInstallTypes = "event::endInstallTypes";
+ type EventInitializationFailed = "event::initializationFailed";
+}
+declare namespace ts.server {
+ interface TypingInstallerResponse {
+ readonly kind: ActionSet | ActionInvalidate | EventTypesRegistry | ActionPackageInstalled | EventBeginInstallTypes | EventEndInstallTypes | EventInitializationFailed;
+ }
+ interface TypingInstallerRequestWithProjectName {
+ readonly projectName: string;
+ }
+ interface DiscoverTypings extends TypingInstallerRequestWithProjectName {
+ readonly fileNames: string[];
+ readonly projectRootPath: Path;
+ readonly compilerOptions: CompilerOptions;
+ readonly watchOptions?: WatchOptions;
+ readonly typeAcquisition: TypeAcquisition;
+ readonly unresolvedImports: SortedReadonlyArray<string>;
+ readonly cachePath?: string;
+ readonly kind: "discover";
+ }
+ interface CloseProject extends TypingInstallerRequestWithProjectName {
+ readonly kind: "closeProject";
+ }
+ interface TypesRegistryRequest {
+ readonly kind: "typesRegistry";
+ }
+ interface InstallPackageRequest extends TypingInstallerRequestWithProjectName {
+ readonly kind: "installPackage";
+ readonly fileName: Path;
+ readonly packageName: string;
+ readonly projectRootPath: Path;
+ }
+ interface PackageInstalledResponse extends ProjectResponse {
+ readonly kind: ActionPackageInstalled;
+ readonly success: boolean;
+ readonly message: string;
+ }
+ interface InitializationFailedResponse extends TypingInstallerResponse {
+ readonly kind: EventInitializationFailed;
+ readonly message: string;
+ }
+ interface ProjectResponse extends TypingInstallerResponse {
+ readonly projectName: string;
+ }
+ interface InvalidateCachedTypings extends ProjectResponse {
+ readonly kind: ActionInvalidate;
+ }
+ interface InstallTypes extends ProjectResponse {
+ readonly kind: EventBeginInstallTypes | EventEndInstallTypes;
+ readonly eventId: number;
+ readonly typingsInstallerVersion: string;
+ readonly packagesToInstall: readonly string[];
+ }
+ interface BeginInstallTypes extends InstallTypes {
+ readonly kind: EventBeginInstallTypes;
+ }
+ interface EndInstallTypes extends InstallTypes {
+ readonly kind: EventEndInstallTypes;
+ readonly installSuccess: boolean;
+ }
+ interface SetTypings extends ProjectResponse {
+ readonly typeAcquisition: TypeAcquisition;
+ readonly compilerOptions: CompilerOptions;
+ readonly typings: string[];
+ readonly unresolvedImports: SortedReadonlyArray<string>;
+ readonly kind: ActionSet;
+ }
+}
+declare namespace ts {
+ interface Node {
+ getSourceFile(): SourceFile;
+ getChildCount(sourceFile?: SourceFile): number;
+ getChildAt(index: number, sourceFile?: SourceFile): Node;
+ getChildren(sourceFile?: SourceFile): Node[];
+ getStart(sourceFile?: SourceFile, includeJsDocComment?: boolean): number;
+ getFullStart(): number;
+ getEnd(): number;
+ getWidth(sourceFile?: SourceFileLike): number;
+ getFullWidth(): number;
+ getLeadingTriviaWidth(sourceFile?: SourceFile): number;
+ getFullText(sourceFile?: SourceFile): string;
+ getText(sourceFile?: SourceFile): string;
+ getFirstToken(sourceFile?: SourceFile): Node | undefined;
+ getLastToken(sourceFile?: SourceFile): Node | undefined;
+ forEachChild<T>(cbNode: (node: Node) => T | undefined, cbNodeArray?: (nodes: NodeArray<Node>) => T | undefined): T | undefined;
+ }
+ interface Identifier {
+ readonly text: string;
+ }
+ interface PrivateIdentifier {
+ readonly text: string;
+ }
+ interface Symbol {
+ readonly name: string;
+ getFlags(): SymbolFlags;
+ getEscapedName(): __String;
+ getName(): string;
+ getDeclarations(): Declaration[] | undefined;
+ getDocumentationComment(typeChecker: TypeChecker | undefined): SymbolDisplayPart[];
+ getJsDocTags(): JSDocTagInfo[];
+ }
+ interface Type {
+ getFlags(): TypeFlags;
+ getSymbol(): Symbol | undefined;
+ getProperties(): Symbol[];
+ getProperty(propertyName: string): Symbol | undefined;
+ getApparentProperties(): Symbol[];
+ getCallSignatures(): readonly Signature[];
+ getConstructSignatures(): readonly Signature[];
+ getStringIndexType(): Type | undefined;
+ getNumberIndexType(): Type | undefined;
+ getBaseTypes(): BaseType[] | undefined;
+ getNonNullableType(): Type;
+ getConstraint(): Type | undefined;
+ getDefault(): Type | undefined;
+ isUnion(): this is UnionType;
+ isIntersection(): this is IntersectionType;
+ isUnionOrIntersection(): this is UnionOrIntersectionType;
+ isLiteral(): this is LiteralType;
+ isStringLiteral(): this is StringLiteralType;
+ isNumberLiteral(): this is NumberLiteralType;
+ isTypeParameter(): this is TypeParameter;
+ isClassOrInterface(): this is InterfaceType;
+ isClass(): this is InterfaceType;
+ }
+ interface TypeReference {
+ typeArguments?: readonly Type[];
+ }
+ interface Signature {
+ getDeclaration(): SignatureDeclaration;
+ getTypeParameters(): TypeParameter[] | undefined;
+ getParameters(): Symbol[];
+ getReturnType(): Type;
+ getDocumentationComment(typeChecker: TypeChecker | undefined): SymbolDisplayPart[];
+ getJsDocTags(): JSDocTagInfo[];
+ }
+ interface SourceFile {
+ getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
+ getLineEndOfPosition(pos: number): number;
+ getLineStarts(): readonly number[];
+ getPositionOfLineAndCharacter(line: number, character: number): number;
+ update(newText: string, textChangeRange: TextChangeRange): SourceFile;
+ }
+ interface SourceFileLike {
+ getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
+ }
+ interface SourceMapSource {
+ getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
+ }
+ /**
+ * Represents an immutable snapshot of a script at a specified time.Once acquired, the
+ * snapshot is observably immutable. i.e. the same calls with the same parameters will return
+ * the same values.
+ */
+ interface IScriptSnapshot {
+ /** Gets a portion of the script snapshot specified by [start, end). */
+ getText(start: number, end: number): string;
+ /** Gets the length of this script snapshot. */
+ getLength(): number;
+ /**
+ * Gets the TextChangeRange that describe how the text changed between this text and
+ * an older version. This information is used by the incremental parser to determine
+ * what sections of the script need to be re-parsed. 'undefined' can be returned if the
+ * change range cannot be determined. However, in that case, incremental parsing will
+ * not happen and the entire document will be re - parsed.
+ */
+ getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange | undefined;
+ /** Releases all resources held by this script snapshot */
+ dispose?(): void;
+ }
+ namespace ScriptSnapshot {
+ function fromString(text: string): IScriptSnapshot;
+ }
+ interface PreProcessedFileInfo {
+ referencedFiles: FileReference[];
+ typeReferenceDirectives: FileReference[];
+ libReferenceDirectives: FileReference[];
+ importedFiles: FileReference[];
+ ambientExternalModules?: string[];
+ isLibFile: boolean;
+ }
+ interface HostCancellationToken {
+ isCancellationRequested(): boolean;
+ }
+ interface InstallPackageOptions {
+ fileName: Path;
+ packageName: string;
+ }
+ interface LanguageServiceHost extends GetEffectiveTypeRootsHost {
+ getCompilationSettings(): CompilerOptions;
+ getNewLine?(): string;
+ getProjectVersion?(): string;
+ getScriptFileNames(): string[];
+ getScriptKind?(fileName: string): ScriptKind;
+ getScriptVersion(fileName: string): string;
+ getScriptSnapshot(fileName: string): IScriptSnapshot | undefined;
+ getProjectReferences?(): readonly ProjectReference[] | undefined;
+ getLocalizedDiagnosticMessages?(): any;
+ getCancellationToken?(): HostCancellationToken;
+ getCurrentDirectory(): string;
+ getDefaultLibFileName(options: CompilerOptions): string;
+ log?(s: string): void;
+ trace?(s: string): void;
+ error?(s: string): void;
+ useCaseSensitiveFileNames?(): boolean;
+ readDirectory?(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[];
+ readFile?(path: string, encoding?: string): string | undefined;
+ realpath?(path: string): string;
+ fileExists?(path: string): boolean;
+ getTypeRootsVersion?(): number;
+ resolveModuleNames?(moduleNames: string[], containingFile: string, reusedNames: string[] | undefined, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions): (ResolvedModule | undefined)[];
+ getResolvedModuleWithFailedLookupLocationsFromCache?(modulename: string, containingFile: string): ResolvedModuleWithFailedLookupLocations | undefined;
+ resolveTypeReferenceDirectives?(typeDirectiveNames: string[], containingFile: string, redirectedReference: ResolvedProjectReference | undefined, options: CompilerOptions): (ResolvedTypeReferenceDirective | undefined)[];
+ getDirectories?(directoryName: string): string[];
+ /**
+ * Gets a set of custom transformers to use during emit.
+ */
+ getCustomTransformers?(): CustomTransformers | undefined;
+ isKnownTypesPackageName?(name: string): boolean;
+ installPackage?(options: InstallPackageOptions): Promise<ApplyCodeActionCommandResult>;
+ writeFile?(fileName: string, content: string): void;
+ }
+ type WithMetadata<T> = T & {
+ metadata?: unknown;
+ };
+ interface LanguageService {
+ /** This is used as a part of restarting the language service. */
+ cleanupSemanticCache(): void;
+ /**
+ * Gets errors indicating invalid syntax in a file.
+ *
+ * In English, "this cdeo have, erorrs" is syntactically invalid because it has typos,
+ * grammatical errors, and misplaced punctuation. Likewise, examples of syntax
+ * errors in TypeScript are missing parentheses in an `if` statement, mismatched
+ * curly braces, and using a reserved keyword as a variable name.
+ *
+ * These diagnostics are inexpensive to compute and don't require knowledge of
+ * other files. Note that a non-empty result increases the likelihood of false positives
+ * from `getSemanticDiagnostics`.
+ *
+ * While these represent the majority of syntax-related diagnostics, there are some
+ * that require the type system, which will be present in `getSemanticDiagnostics`.
+ *
+ * @param fileName A path to the file you want syntactic diagnostics for
+ */
+ getSyntacticDiagnostics(fileName: string): DiagnosticWithLocation[];
+ /**
+ * Gets warnings or errors indicating type system issues in a given file.
+ * Requesting semantic diagnostics may start up the type system and
+ * run deferred work, so the first call may take longer than subsequent calls.
+ *
+ * Unlike the other get*Diagnostics functions, these diagnostics can potentially not
+ * include a reference to a source file. Specifically, the first time this is called,
+ * it will return global diagnostics with no associated location.
+ *
+ * To contrast the differences between semantic and syntactic diagnostics, consider the
+ * sentence: "The sun is green." is syntactically correct; those are real English words with
+ * correct sentence structure. However, it is semantically invalid, because it is not true.
+ *
+ * @param fileName A path to the file you want semantic diagnostics for
+ */
+ getSemanticDiagnostics(fileName: string): Diagnostic[];
+ /**
+ * Gets suggestion diagnostics for a specific file. These diagnostics tend to
+ * proactively suggest refactors, as opposed to diagnostics that indicate
+ * potentially incorrect runtime behavior.
+ *
+ * @param fileName A path to the file you want semantic diagnostics for
+ */
+ getSuggestionDiagnostics(fileName: string): DiagnosticWithLocation[];
+ /**
+ * Gets global diagnostics related to the program configuration and compiler options.
+ */
+ getCompilerOptionsDiagnostics(): Diagnostic[];
+ /** @deprecated Use getEncodedSyntacticClassifications instead. */
+ getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[];
+ /** @deprecated Use getEncodedSemanticClassifications instead. */
+ getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[];
+ getEncodedSyntacticClassifications(fileName: string, span: TextSpan): Classifications;
+ getEncodedSemanticClassifications(fileName: string, span: TextSpan): Classifications;
+ /**
+ * Gets completion entries at a particular position in a file.
+ *
+ * @param fileName The path to the file
+ * @param position A zero-based index of the character where you want the entries
+ * @param options An object describing how the request was triggered and what kinds
+ * of code actions can be returned with the completions.
+ */
+ getCompletionsAtPosition(fileName: string, position: number, options: GetCompletionsAtPositionOptions | undefined): WithMetadata<CompletionInfo> | undefined;
+ /**
+ * Gets the extended details for a completion entry retrieved from `getCompletionsAtPosition`.
+ *
+ * @param fileName The path to the file
+ * @param position A zero based index of the character where you want the entries
+ * @param entryName The name from an existing completion which came from `getCompletionsAtPosition`
+ * @param formatOptions How should code samples in the completions be formatted, can be undefined for backwards compatibility
+ * @param source Source code for the current file, can be undefined for backwards compatibility
+ * @param preferences User settings, can be undefined for backwards compatibility
+ */
+ getCompletionEntryDetails(fileName: string, position: number, entryName: string, formatOptions: FormatCodeOptions | FormatCodeSettings | undefined, source: string | undefined, preferences: UserPreferences | undefined): CompletionEntryDetails | undefined;
+ getCompletionEntrySymbol(fileName: string, position: number, name: string, source: string | undefined): Symbol | undefined;
+ /**
+ * Gets semantic information about the identifier at a particular position in a
+ * file. Quick info is what you typically see when you hover in an editor.
+ *
+ * @param fileName The path to the file
+ * @param position A zero-based index of the character where you want the quick info
+ */
+ getQuickInfoAtPosition(fileName: string, position: number): QuickInfo | undefined;
+ getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan | undefined;
+ getBreakpointStatementAtPosition(fileName: string, position: number): TextSpan | undefined;
+ getSignatureHelpItems(fileName: string, position: number, options: SignatureHelpItemsOptions | undefined): SignatureHelpItems | undefined;
+ getRenameInfo(fileName: string, position: number, options?: RenameInfoOptions): RenameInfo;
+ findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean, providePrefixAndSuffixTextForRename?: boolean): readonly RenameLocation[] | undefined;
+ getSmartSelectionRange(fileName: string, position: number): SelectionRange;
+ getDefinitionAtPosition(fileName: string, position: number): readonly DefinitionInfo[] | undefined;
+ getDefinitionAndBoundSpan(fileName: string, position: number): DefinitionInfoAndBoundSpan | undefined;
+ getTypeDefinitionAtPosition(fileName: string, position: number): readonly DefinitionInfo[] | undefined;
+ getImplementationAtPosition(fileName: string, position: number): readonly ImplementationLocation[] | undefined;
+ getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[] | undefined;
+ findReferences(fileName: string, position: number): ReferencedSymbol[] | undefined;
+ getDocumentHighlights(fileName: string, position: number, filesToSearch: string[]): DocumentHighlights[] | undefined;
+ /** @deprecated */
+ getOccurrencesAtPosition(fileName: string, position: number): readonly ReferenceEntry[] | undefined;
+ getNavigateToItems(searchValue: string, maxResultCount?: number, fileName?: string, excludeDtsFiles?: boolean): NavigateToItem[];
+ getNavigationBarItems(fileName: string): NavigationBarItem[];
+ getNavigationTree(fileName: string): NavigationTree;
+ prepareCallHierarchy(fileName: string, position: number): CallHierarchyItem | CallHierarchyItem[] | undefined;
+ provideCallHierarchyIncomingCalls(fileName: string, position: number): CallHierarchyIncomingCall[];
+ provideCallHierarchyOutgoingCalls(fileName: string, position: number): CallHierarchyOutgoingCall[];
+ getOutliningSpans(fileName: string): OutliningSpan[];
+ getTodoComments(fileName: string, descriptors: TodoCommentDescriptor[]): TodoComment[];
+ getBraceMatchingAtPosition(fileName: string, position: number): TextSpan[];
+ getIndentationAtPosition(fileName: string, position: number, options: EditorOptions | EditorSettings): number;
+ getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions | FormatCodeSettings): TextChange[];
+ getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions | FormatCodeSettings): TextChange[];
+ getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions | FormatCodeSettings): TextChange[];
+ getDocCommentTemplateAtPosition(fileName: string, position: number): TextInsertion | undefined;
+ isValidBraceCompletionAtPosition(fileName: string, position: number, openingBrace: number): boolean;
+ /**
+ * This will return a defined result if the position is after the `>` of the opening tag, or somewhere in the text, of a JSXElement with no closing tag.
+ * Editors should call this after `>` is typed.
+ */
+ getJsxClosingTagAtPosition(fileName: string, position: number): JsxClosingTagInfo | undefined;
+ getSpanOfEnclosingComment(fileName: string, position: number, onlyMultiLine: boolean): TextSpan | undefined;
+ toLineColumnOffset?(fileName: string, position: number): LineAndCharacter;
+ getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: readonly number[], formatOptions: FormatCodeSettings, preferences: UserPreferences): readonly CodeFixAction[];
+ getCombinedCodeFix(scope: CombinedCodeFixScope, fixId: {}, formatOptions: FormatCodeSettings, preferences: UserPreferences): CombinedCodeActions;
+ applyCodeActionCommand(action: CodeActionCommand, formatSettings?: FormatCodeSettings): Promise<ApplyCodeActionCommandResult>;
+ applyCodeActionCommand(action: CodeActionCommand[], formatSettings?: FormatCodeSettings): Promise<ApplyCodeActionCommandResult[]>;
+ applyCodeActionCommand(action: CodeActionCommand | CodeActionCommand[], formatSettings?: FormatCodeSettings): Promise<ApplyCodeActionCommandResult | ApplyCodeActionCommandResult[]>;
+ /** @deprecated `fileName` will be ignored */
+ applyCodeActionCommand(fileName: string, action: CodeActionCommand): Promise<ApplyCodeActionCommandResult>;
+ /** @deprecated `fileName` will be ignored */
+ applyCodeActionCommand(fileName: string, action: CodeActionCommand[]): Promise<ApplyCodeActionCommandResult[]>;
+ /** @deprecated `fileName` will be ignored */
+ applyCodeActionCommand(fileName: string, action: CodeActionCommand | CodeActionCommand[]): Promise<ApplyCodeActionCommandResult | ApplyCodeActionCommandResult[]>;
+ getApplicableRefactors(fileName: string, positionOrRange: number | TextRange, preferences: UserPreferences | undefined): ApplicableRefactorInfo[];
+ getEditsForRefactor(fileName: string, formatOptions: FormatCodeSettings, positionOrRange: number | TextRange, refactorName: string, actionName: string, preferences: UserPreferences | undefined): RefactorEditInfo | undefined;
+ organizeImports(scope: OrganizeImportsScope, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): readonly FileTextChanges[];
+ getEditsForFileRename(oldFilePath: string, newFilePath: string, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): readonly FileTextChanges[];
+ getEmitOutput(fileName: string, emitOnlyDtsFiles?: boolean, forceDtsEmit?: boolean): EmitOutput;
+ getProgram(): Program | undefined;
+ dispose(): void;
+ }
+ interface JsxClosingTagInfo {
+ readonly newText: string;
+ }
+ interface CombinedCodeFixScope {
+ type: "file";
+ fileName: string;
+ }
+ type OrganizeImportsScope = CombinedCodeFixScope;
+ type CompletionsTriggerCharacter = "." | '"' | "'" | "`" | "/" | "@" | "<" | "#";
+ interface GetCompletionsAtPositionOptions extends UserPreferences {
+ /**
+ * If the editor is asking for completions because a certain character was typed
+ * (as opposed to when the user explicitly requested them) this should be set.
+ */
+ triggerCharacter?: CompletionsTriggerCharacter;
+ /** @deprecated Use includeCompletionsForModuleExports */
+ includeExternalModuleExports?: boolean;
+ /** @deprecated Use includeCompletionsWithInsertText */
+ includeInsertTextCompletions?: boolean;
+ }
+ type SignatureHelpTriggerCharacter = "," | "(" | "<";
+ type SignatureHelpRetriggerCharacter = SignatureHelpTriggerCharacter | ")";
+ interface SignatureHelpItemsOptions {
+ triggerReason?: SignatureHelpTriggerReason;
+ }
+ type SignatureHelpTriggerReason = SignatureHelpInvokedReason | SignatureHelpCharacterTypedReason | SignatureHelpRetriggeredReason;
+ /**
+ * Signals that the user manually requested signature help.
+ * The language service will unconditionally attempt to provide a result.
+ */
+ interface SignatureHelpInvokedReason {
+ kind: "invoked";
+ triggerCharacter?: undefined;
+ }
+ /**
+ * Signals that the signature help request came from a user typing a character.
+ * Depending on the character and the syntactic context, the request may or may not be served a result.
+ */
+ interface SignatureHelpCharacterTypedReason {
+ kind: "characterTyped";
+ /**
+ * Character that was responsible for triggering signature help.
+ */
+ triggerCharacter: SignatureHelpTriggerCharacter;
+ }
+ /**
+ * Signals that this signature help request came from typing a character or moving the cursor.
+ * This should only occur if a signature help session was already active and the editor needs to see if it should adjust.
+ * The language service will unconditionally attempt to provide a result.
+ * `triggerCharacter` can be `undefined` for a retrigger caused by a cursor move.
+ */
+ interface SignatureHelpRetriggeredReason {
+ kind: "retrigger";
+ /**
+ * Character that was responsible for triggering signature help.
+ */
+ triggerCharacter?: SignatureHelpRetriggerCharacter;
+ }
+ interface ApplyCodeActionCommandResult {
+ successMessage: string;
+ }
+ interface Classifications {
+ spans: number[];
+ endOfLineState: EndOfLineState;
+ }
+ interface ClassifiedSpan {
+ textSpan: TextSpan;
+ classificationType: ClassificationTypeNames;
+ }
+ /**
+ * Navigation bar interface designed for visual studio's dual-column layout.
+ * This does not form a proper tree.
+ * The navbar is returned as a list of top-level items, each of which has a list of child items.
+ * Child items always have an empty array for their `childItems`.
+ */
+ interface NavigationBarItem {
+ text: string;
+ kind: ScriptElementKind;
+ kindModifiers: string;
+ spans: TextSpan[];
+ childItems: NavigationBarItem[];
+ indent: number;
+ bolded: boolean;
+ grayed: boolean;
+ }
+ /**
+ * Node in a tree of nested declarations in a file.
+ * The top node is always a script or module node.
+ */
+ interface NavigationTree {
+ /** Name of the declaration, or a short description, e.g. "<class>". */
+ text: string;
+ kind: ScriptElementKind;
+ /** ScriptElementKindModifier separated by commas, e.g. "public,abstract" */
+ kindModifiers: string;
+ /**
+ * Spans of the nodes that generated this declaration.
+ * There will be more than one if this is the result of merging.
+ */
+ spans: TextSpan[];
+ nameSpan: TextSpan | undefined;
+ /** Present if non-empty */
+ childItems?: NavigationTree[];
+ }
+ interface CallHierarchyItem {
+ name: string;
+ kind: ScriptElementKind;
+ file: string;
+ span: TextSpan;
+ selectionSpan: TextSpan;
+ }
+ interface CallHierarchyIncomingCall {
+ from: CallHierarchyItem;
+ fromSpans: TextSpan[];
+ }
+ interface CallHierarchyOutgoingCall {
+ to: CallHierarchyItem;
+ fromSpans: TextSpan[];
+ }
+ interface TodoCommentDescriptor {
+ text: string;
+ priority: number;
+ }
+ interface TodoComment {
+ descriptor: TodoCommentDescriptor;
+ message: string;
+ position: number;
+ }
+ interface TextChange {
+ span: TextSpan;
+ newText: string;
+ }
+ interface FileTextChanges {
+ fileName: string;
+ textChanges: readonly TextChange[];
+ isNewFile?: boolean;
+ }
+ interface CodeAction {
+ /** Description of the code action to display in the UI of the editor */
+ description: string;
+ /** Text changes to apply to each file as part of the code action */
+ changes: FileTextChanges[];
+ /**
+ * If the user accepts the code fix, the editor should send the action back in a `applyAction` request.
+ * This allows the language service to have side effects (e.g. installing dependencies) upon a code fix.
+ */
+ commands?: CodeActionCommand[];
+ }
+ interface CodeFixAction extends CodeAction {
+ /** Short name to identify the fix, for use by telemetry. */
+ fixName: string;
+ /**
+ * If present, one may call 'getCombinedCodeFix' with this fixId.
+ * This may be omitted to indicate that the code fix can't be applied in a group.
+ */
+ fixId?: {};
+ fixAllDescription?: string;
+ }
+ interface CombinedCodeActions {
+ changes: readonly FileTextChanges[];
+ commands?: readonly CodeActionCommand[];
+ }
+ type CodeActionCommand = InstallPackageAction;
+ interface InstallPackageAction {
+ }
+ /**
+ * A set of one or more available refactoring actions, grouped under a parent refactoring.
+ */
+ interface ApplicableRefactorInfo {
+ /**
+ * The programmatic name of the refactoring
+ */
+ name: string;
+ /**
+ * A description of this refactoring category to show to the user.
+ * If the refactoring gets inlined (see below), this text will not be visible.
+ */
+ description: string;
+ /**
+ * Inlineable refactorings can have their actions hoisted out to the top level
+ * of a context menu. Non-inlineanable refactorings should always be shown inside
+ * their parent grouping.
+ *
+ * If not specified, this value is assumed to be 'true'
+ */
+ inlineable?: boolean;
+ actions: RefactorActionInfo[];
+ }
+ /**
+ * Represents a single refactoring action - for example, the "Extract Method..." refactor might
+ * offer several actions, each corresponding to a surround class or closure to extract into.
+ */
+ interface RefactorActionInfo {
+ /**
+ * The programmatic name of the refactoring action
+ */
+ name: string;
+ /**
+ * A description of this refactoring action to show to the user.
+ * If the parent refactoring is inlined away, this will be the only text shown,
+ * so this description should make sense by itself if the parent is inlineable=true
+ */
+ description: string;
+ }
+ /**
+ * A set of edits to make in response to a refactor action, plus an optional
+ * location where renaming should be invoked from
+ */
+ interface RefactorEditInfo {
+ edits: FileTextChanges[];
+ renameFilename?: string;
+ renameLocation?: number;
+ commands?: CodeActionCommand[];
+ }
+ interface TextInsertion {
+ newText: string;
+ /** The position in newText the caret should point to after the insertion. */
+ caretOffset: number;
+ }
+ interface DocumentSpan {
+ textSpan: TextSpan;
+ fileName: string;
+ /**
+ * If the span represents a location that was remapped (e.g. via a .d.ts.map file),
+ * then the original filename and span will be specified here
+ */
+ originalTextSpan?: TextSpan;
+ originalFileName?: string;
+ /**
+ * If DocumentSpan.textSpan is the span for name of the declaration,
+ * then this is the span for relevant declaration
+ */
+ contextSpan?: TextSpan;
+ originalContextSpan?: TextSpan;
+ }
+ interface RenameLocation extends DocumentSpan {
+ readonly prefixText?: string;
+ readonly suffixText?: string;
+ }
+ interface ReferenceEntry extends DocumentSpan {
+ isWriteAccess: boolean;
+ isDefinition: boolean;
+ isInString?: true;
+ }
+ interface ImplementationLocation extends DocumentSpan {
+ kind: ScriptElementKind;
+ displayParts: SymbolDisplayPart[];
+ }
+ enum HighlightSpanKind {
+ none = "none",
+ definition = "definition",
+ reference = "reference",
+ writtenReference = "writtenReference"
+ }
+ interface HighlightSpan {
+ fileName?: string;
+ isInString?: true;
+ textSpan: TextSpan;
+ contextSpan?: TextSpan;
+ kind: HighlightSpanKind;
+ }
+ interface NavigateToItem {
+ name: string;
+ kind: ScriptElementKind;
+ kindModifiers: string;
+ matchKind: "exact" | "prefix" | "substring" | "camelCase";
+ isCaseSensitive: boolean;
+ fileName: string;
+ textSpan: TextSpan;
+ containerName: string;
+ containerKind: ScriptElementKind;
+ }
+ enum IndentStyle {
+ None = 0,
+ Block = 1,
+ Smart = 2
+ }
+ enum SemicolonPreference {
+ Ignore = "ignore",
+ Insert = "insert",
+ Remove = "remove"
+ }
+ interface EditorOptions {
+ BaseIndentSize?: number;
+ IndentSize: number;
+ TabSize: number;
+ NewLineCharacter: string;
+ ConvertTabsToSpaces: boolean;
+ IndentStyle: IndentStyle;
+ }
+ interface EditorSettings {
+ baseIndentSize?: number;
+ indentSize?: number;
+ tabSize?: number;
+ newLineCharacter?: string;
+ convertTabsToSpaces?: boolean;
+ indentStyle?: IndentStyle;
+ trimTrailingWhitespace?: boolean;
+ }
+ interface FormatCodeOptions extends EditorOptions {
+ InsertSpaceAfterCommaDelimiter: boolean;
+ InsertSpaceAfterSemicolonInForStatements: boolean;
+ InsertSpaceBeforeAndAfterBinaryOperators: boolean;
+ InsertSpaceAfterConstructor?: boolean;
+ InsertSpaceAfterKeywordsInControlFlowStatements: boolean;
+ InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean;
+ InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean;
+ InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: boolean;
+ InsertSpaceAfterOpeningAndBeforeClosingNonemptyBraces?: boolean;
+ InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: boolean;
+ InsertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean;
+ InsertSpaceAfterTypeAssertion?: boolean;
+ InsertSpaceBeforeFunctionParenthesis?: boolean;
+ PlaceOpenBraceOnNewLineForFunctions: boolean;
+ PlaceOpenBraceOnNewLineForControlBlocks: boolean;
+ insertSpaceBeforeTypeAnnotation?: boolean;
+ }
+ interface FormatCodeSettings extends EditorSettings {
+ readonly insertSpaceAfterCommaDelimiter?: boolean;
+ readonly insertSpaceAfterSemicolonInForStatements?: boolean;
+ readonly insertSpaceBeforeAndAfterBinaryOperators?: boolean;
+ readonly insertSpaceAfterConstructor?: boolean;
+ readonly insertSpaceAfterKeywordsInControlFlowStatements?: boolean;
+ readonly insertSpaceAfterFunctionKeywordForAnonymousFunctions?: boolean;
+ readonly insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis?: boolean;
+ readonly insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets?: boolean;
+ readonly insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces?: boolean;
+ readonly insertSpaceAfterOpeningAndBeforeClosingEmptyBraces?: boolean;
+ readonly insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces?: boolean;
+ readonly insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean;
+ readonly insertSpaceAfterTypeAssertion?: boolean;
+ readonly insertSpaceBeforeFunctionParenthesis?: boolean;
+ readonly placeOpenBraceOnNewLineForFunctions?: boolean;
+ readonly placeOpenBraceOnNewLineForControlBlocks?: boolean;
+ readonly insertSpaceBeforeTypeAnnotation?: boolean;
+ readonly indentMultiLineObjectLiteralBeginningOnBlankLine?: boolean;
+ readonly semicolons?: SemicolonPreference;
+ }
+ function getDefaultFormatCodeSettings(newLineCharacter?: string): FormatCodeSettings;
+ interface DefinitionInfo extends DocumentSpan {
+ kind: ScriptElementKind;
+ name: string;
+ containerKind: ScriptElementKind;
+ containerName: string;
+ }
+ interface DefinitionInfoAndBoundSpan {
+ definitions?: readonly DefinitionInfo[];
+ textSpan: TextSpan;
+ }
+ interface ReferencedSymbolDefinitionInfo extends DefinitionInfo {
+ displayParts: SymbolDisplayPart[];
+ }
+ interface ReferencedSymbol {
+ definition: ReferencedSymbolDefinitionInfo;
+ references: ReferenceEntry[];
+ }
+ enum SymbolDisplayPartKind {
+ aliasName = 0,
+ className = 1,
+ enumName = 2,
+ fieldName = 3,
+ interfaceName = 4,
+ keyword = 5,
+ lineBreak = 6,
+ numericLiteral = 7,
+ stringLiteral = 8,
+ localName = 9,
+ methodName = 10,
+ moduleName = 11,
+ operator = 12,
+ parameterName = 13,
+ propertyName = 14,
+ punctuation = 15,
+ space = 16,
+ text = 17,
+ typeParameterName = 18,
+ enumMemberName = 19,
+ functionName = 20,
+ regularExpressionLiteral = 21
+ }
+ interface SymbolDisplayPart {
+ text: string;
+ kind: string;
+ }
+ interface JSDocTagInfo {
+ name: string;
+ text?: string;
+ }
+ interface QuickInfo {
+ kind: ScriptElementKind;
+ kindModifiers: string;
+ textSpan: TextSpan;
+ displayParts?: SymbolDisplayPart[];
+ documentation?: SymbolDisplayPart[];
+ tags?: JSDocTagInfo[];
+ }
+ type RenameInfo = RenameInfoSuccess | RenameInfoFailure;
+ interface RenameInfoSuccess {
+ canRename: true;
+ /**
+ * File or directory to rename.
+ * If set, `getEditsForFileRename` should be called instead of `findRenameLocations`.
+ */
+ fileToRename?: string;
+ displayName: string;
+ fullDisplayName: string;
+ kind: ScriptElementKind;
+ kindModifiers: string;
+ triggerSpan: TextSpan;
+ }
+ interface RenameInfoFailure {
+ canRename: false;
+ localizedErrorMessage: string;
+ }
+ interface RenameInfoOptions {
+ readonly allowRenameOfImportPath?: boolean;
+ }
+ interface SignatureHelpParameter {
+ name: string;
+ documentation: SymbolDisplayPart[];
+ displayParts: SymbolDisplayPart[];
+ isOptional: boolean;
+ }
+ interface SelectionRange {
+ textSpan: TextSpan;
+ parent?: SelectionRange;
+ }
+ /**
+ * Represents a single signature to show in signature help.
+ * The id is used for subsequent calls into the language service to ask questions about the
+ * signature help item in the context of any documents that have been updated. i.e. after
+ * an edit has happened, while signature help is still active, the host can ask important
+ * questions like 'what parameter is the user currently contained within?'.
+ */
+ interface SignatureHelpItem {
+ isVariadic: boolean;
+ prefixDisplayParts: SymbolDisplayPart[];
+ suffixDisplayParts: SymbolDisplayPart[];
+ separatorDisplayParts: SymbolDisplayPart[];
+ parameters: SignatureHelpParameter[];
+ documentation: SymbolDisplayPart[];
+ tags: JSDocTagInfo[];
+ }
+ /**
+ * Represents a set of signature help items, and the preferred item that should be selected.
+ */
+ interface SignatureHelpItems {
+ items: SignatureHelpItem[];
+ applicableSpan: TextSpan;
+ selectedItemIndex: number;
+ argumentIndex: number;
+ argumentCount: number;
+ }
+ interface CompletionInfo {
+ /** Not true for all global completions. This will be true if the enclosing scope matches a few syntax kinds. See `isSnippetScope`. */
+ isGlobalCompletion: boolean;
+ isMemberCompletion: boolean;
+ /**
+ * true when the current location also allows for a new identifier
+ */
+ isNewIdentifierLocation: boolean;
+ entries: CompletionEntry[];
+ }
+ interface CompletionEntry {
+ name: string;
+ kind: ScriptElementKind;
+ kindModifiers?: string;
+ sortText: string;
+ insertText?: string;
+ /**
+ * An optional span that indicates the text to be replaced by this completion item.
+ * If present, this span should be used instead of the default one.
+ * It will be set if the required span differs from the one generated by the default replacement behavior.
+ */
+ replacementSpan?: TextSpan;
+ hasAction?: true;
+ source?: string;
+ isRecommended?: true;
+ isFromUncheckedFile?: true;
+ }
+ interface CompletionEntryDetails {
+ name: string;
+ kind: ScriptElementKind;
+ kindModifiers: string;
+ displayParts: SymbolDisplayPart[];
+ documentation?: SymbolDisplayPart[];
+ tags?: JSDocTagInfo[];
+ codeActions?: CodeAction[];
+ source?: SymbolDisplayPart[];
+ }
+ interface OutliningSpan {
+ /** The span of the document to actually collapse. */
+ textSpan: TextSpan;
+ /** The span of the document to display when the user hovers over the collapsed span. */
+ hintSpan: TextSpan;
+ /** The text to display in the editor for the collapsed region. */
+ bannerText: string;
+ /**
+ * Whether or not this region should be automatically collapsed when
+ * the 'Collapse to Definitions' command is invoked.
+ */
+ autoCollapse: boolean;
+ /**
+ * Classification of the contents of the span
+ */
+ kind: OutliningSpanKind;
+ }
+ enum OutliningSpanKind {
+ /** Single or multi-line comments */
+ Comment = "comment",
+ /** Sections marked by '// #region' and '// #endregion' comments */
+ Region = "region",
+ /** Declarations and expressions */
+ Code = "code",
+ /** Contiguous blocks of import declarations */
+ Imports = "imports"
+ }
+ enum OutputFileType {
+ JavaScript = 0,
+ SourceMap = 1,
+ Declaration = 2
+ }
+ enum EndOfLineState {
+ None = 0,
+ InMultiLineCommentTrivia = 1,
+ InSingleQuoteStringLiteral = 2,
+ InDoubleQuoteStringLiteral = 3,
+ InTemplateHeadOrNoSubstitutionTemplate = 4,
+ InTemplateMiddleOrTail = 5,
+ InTemplateSubstitutionPosition = 6
+ }
+ enum TokenClass {
+ Punctuation = 0,
+ Keyword = 1,
+ Operator = 2,
+ Comment = 3,
+ Whitespace = 4,
+ Identifier = 5,
+ NumberLiteral = 6,
+ BigIntLiteral = 7,
+ StringLiteral = 8,
+ RegExpLiteral = 9
+ }
+ interface ClassificationResult {
+ finalLexState: EndOfLineState;
+ entries: ClassificationInfo[];
+ }
+ interface ClassificationInfo {
+ length: number;
+ classification: TokenClass;
+ }
+ interface Classifier {
+ /**
+ * Gives lexical classifications of tokens on a line without any syntactic context.
+ * For instance, a token consisting of the text 'string' can be either an identifier
+ * named 'string' or the keyword 'string', however, because this classifier is not aware,
+ * it relies on certain heuristics to give acceptable results. For classifications where
+ * speed trumps accuracy, this function is preferable; however, for true accuracy, the
+ * syntactic classifier is ideal. In fact, in certain editing scenarios, combining the
+ * lexical, syntactic, and semantic classifiers may issue the best user experience.
+ *
+ * @param text The text of a line to classify.
+ * @param lexState The state of the lexical classifier at the end of the previous line.
+ * @param syntacticClassifierAbsent Whether the client is *not* using a syntactic classifier.
+ * If there is no syntactic classifier (syntacticClassifierAbsent=true),
+ * certain heuristics may be used in its place; however, if there is a
+ * syntactic classifier (syntacticClassifierAbsent=false), certain
+ * classifications which may be incorrectly categorized will be given
+ * back as Identifiers in order to allow the syntactic classifier to
+ * subsume the classification.
+ * @deprecated Use getLexicalClassifications instead.
+ */
+ getClassificationsForLine(text: string, lexState: EndOfLineState, syntacticClassifierAbsent: boolean): ClassificationResult;
+ getEncodedLexicalClassifications(text: string, endOfLineState: EndOfLineState, syntacticClassifierAbsent: boolean): Classifications;
+ }
+ enum ScriptElementKind {
+ unknown = "",
+ warning = "warning",
+ /** predefined type (void) or keyword (class) */
+ keyword = "keyword",
+ /** top level script node */
+ scriptElement = "script",
+ /** module foo {} */
+ moduleElement = "module",
+ /** class X {} */
+ classElement = "class",
+ /** var x = class X {} */
+ localClassElement = "local class",
+ /** interface Y {} */
+ interfaceElement = "interface",
+ /** type T = ... */
+ typeElement = "type",
+ /** enum E */
+ enumElement = "enum",
+ enumMemberElement = "enum member",
+ /**
+ * Inside module and script only
+ * const v = ..
+ */
+ variableElement = "var",
+ /** Inside function */
+ localVariableElement = "local var",
+ /**
+ * Inside module and script only
+ * function f() { }
+ */
+ functionElement = "function",
+ /** Inside function */
+ localFunctionElement = "local function",
+ /** class X { [public|private]* foo() {} } */
+ memberFunctionElement = "method",
+ /** class X { [public|private]* [get|set] foo:number; } */
+ memberGetAccessorElement = "getter",
+ memberSetAccessorElement = "setter",
+ /**
+ * class X { [public|private]* foo:number; }
+ * interface Y { foo:number; }
+ */
+ memberVariableElement = "property",
+ /** class X { constructor() { } } */
+ constructorImplementationElement = "constructor",
+ /** interface Y { ():number; } */
+ callSignatureElement = "call",
+ /** interface Y { []:number; } */
+ indexSignatureElement = "index",
+ /** interface Y { new():Y; } */
+ constructSignatureElement = "construct",
+ /** function foo(*Y*: string) */
+ parameterElement = "parameter",
+ typeParameterElement = "type parameter",
+ primitiveType = "primitive type",
+ label = "label",
+ alias = "alias",
+ constElement = "const",
+ letElement = "let",
+ directory = "directory",
+ externalModuleName = "external module name",
+ /**
+ * <JsxTagName attribute1 attribute2={0} />
+ */
+ jsxAttribute = "JSX attribute",
+ /** String literal */
+ string = "string"
+ }
+ enum ScriptElementKindModifier {
+ none = "",
+ publicMemberModifier = "public",
+ privateMemberModifier = "private",
+ protectedMemberModifier = "protected",
+ exportedModifier = "export",
+ ambientModifier = "declare",
+ staticModifier = "static",
+ abstractModifier = "abstract",
+ optionalModifier = "optional",
+ dtsModifier = ".d.ts",
+ tsModifier = ".ts",
+ tsxModifier = ".tsx",
+ jsModifier = ".js",
+ jsxModifier = ".jsx",
+ jsonModifier = ".json"
+ }
+ enum ClassificationTypeNames {
+ comment = "comment",
+ identifier = "identifier",
+ keyword = "keyword",
+ numericLiteral = "number",
+ bigintLiteral = "bigint",
+ operator = "operator",
+ stringLiteral = "string",
+ whiteSpace = "whitespace",
+ text = "text",
+ punctuation = "punctuation",
+ className = "class name",
+ enumName = "enum name",
+ interfaceName = "interface name",
+ moduleName = "module name",
+ typeParameterName = "type parameter name",
+ typeAliasName = "type alias name",
+ parameterName = "parameter name",
+ docCommentTagName = "doc comment tag name",
+ jsxOpenTagName = "jsx open tag name",
+ jsxCloseTagName = "jsx close tag name",
+ jsxSelfClosingTagName = "jsx self closing tag name",
+ jsxAttribute = "jsx attribute",
+ jsxText = "jsx text",
+ jsxAttributeStringLiteralValue = "jsx attribute string literal value"
+ }
+ enum ClassificationType {
+ comment = 1,
+ identifier = 2,
+ keyword = 3,
+ numericLiteral = 4,
+ operator = 5,
+ stringLiteral = 6,
+ regularExpressionLiteral = 7,
+ whiteSpace = 8,
+ text = 9,
+ punctuation = 10,
+ className = 11,
+ enumName = 12,
+ interfaceName = 13,
+ moduleName = 14,
+ typeParameterName = 15,
+ typeAliasName = 16,
+ parameterName = 17,
+ docCommentTagName = 18,
+ jsxOpenTagName = 19,
+ jsxCloseTagName = 20,
+ jsxSelfClosingTagName = 21,
+ jsxAttribute = 22,
+ jsxText = 23,
+ jsxAttributeStringLiteralValue = 24,
+ bigintLiteral = 25
+ }
+}
+declare namespace ts {
+ /** The classifier is used for syntactic highlighting in editors via the TSServer */
+ function createClassifier(): Classifier;
+}
+declare namespace ts {
+ interface DocumentHighlights {
+ fileName: string;
+ highlightSpans: HighlightSpan[];
+ }
+}
+declare namespace ts {
+ /**
+ * The document registry represents a store of SourceFile objects that can be shared between
+ * multiple LanguageService instances. A LanguageService instance holds on the SourceFile (AST)
+ * of files in the context.
+ * SourceFile objects account for most of the memory usage by the language service. Sharing
+ * the same DocumentRegistry instance between different instances of LanguageService allow
+ * for more efficient memory utilization since all projects will share at least the library
+ * file (lib.d.ts).
+ *
+ * A more advanced use of the document registry is to serialize sourceFile objects to disk
+ * and re-hydrate them when needed.
+ *
+ * To create a default DocumentRegistry, use createDocumentRegistry to create one, and pass it
+ * to all subsequent createLanguageService calls.
+ */
+ interface DocumentRegistry {
+ /**
+ * Request a stored SourceFile with a given fileName and compilationSettings.
+ * The first call to acquire will call createLanguageServiceSourceFile to generate
+ * the SourceFile if was not found in the registry.
+ *
+ * @param fileName The name of the file requested
+ * @param compilationSettings Some compilation settings like target affects the
+ * shape of a the resulting SourceFile. This allows the DocumentRegistry to store
+ * multiple copies of the same file for different compilation settings.
+ * @param scriptSnapshot Text of the file. Only used if the file was not found
+ * in the registry and a new one was created.
+ * @param version Current version of the file. Only used if the file was not found
+ * in the registry and a new one was created.
+ */
+ acquireDocument(fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile;
+ acquireDocumentWithKey(fileName: string, path: Path, compilationSettings: CompilerOptions, key: DocumentRegistryBucketKey, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile;
+ /**
+ * Request an updated version of an already existing SourceFile with a given fileName
+ * and compilationSettings. The update will in-turn call updateLanguageServiceSourceFile
+ * to get an updated SourceFile.
+ *
+ * @param fileName The name of the file requested
+ * @param compilationSettings Some compilation settings like target affects the
+ * shape of a the resulting SourceFile. This allows the DocumentRegistry to store
+ * multiple copies of the same file for different compilation settings.
+ * @param scriptSnapshot Text of the file.
+ * @param version Current version of the file.
+ */
+ updateDocument(fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile;
+ updateDocumentWithKey(fileName: string, path: Path, compilationSettings: CompilerOptions, key: DocumentRegistryBucketKey, scriptSnapshot: IScriptSnapshot, version: string, scriptKind?: ScriptKind): SourceFile;
+ getKeyForCompilationSettings(settings: CompilerOptions): DocumentRegistryBucketKey;
+ /**
+ * Informs the DocumentRegistry that a file is not needed any longer.
+ *
+ * Note: It is not allowed to call release on a SourceFile that was not acquired from
+ * this registry originally.
+ *
+ * @param fileName The name of the file to be released
+ * @param compilationSettings The compilation settings used to acquire the file
+ */
+ releaseDocument(fileName: string, compilationSettings: CompilerOptions): void;
+ releaseDocumentWithKey(path: Path, key: DocumentRegistryBucketKey): void;
+ reportStats(): string;
+ }
+ type DocumentRegistryBucketKey = string & {
+ __bucketKey: any;
+ };
+ function createDocumentRegistry(useCaseSensitiveFileNames?: boolean, currentDirectory?: string): DocumentRegistry;
+}
+declare namespace ts {
+ function preProcessFile(sourceText: string, readImportFiles?: boolean, detectJavaScriptImports?: boolean): PreProcessedFileInfo;
+}
+declare namespace ts {
+ interface TranspileOptions {
+ compilerOptions?: CompilerOptions;
+ fileName?: string;
+ reportDiagnostics?: boolean;
+ moduleName?: string;
+ renamedDependencies?: MapLike<string>;
+ transformers?: CustomTransformers;
+ }
+ interface TranspileOutput {
+ outputText: string;
+ diagnostics?: Diagnostic[];
+ sourceMapText?: string;
+ }
+ function transpileModule(input: string, transpileOptions: TranspileOptions): TranspileOutput;
+ function transpile(input: string, compilerOptions?: CompilerOptions, fileName?: string, diagnostics?: Diagnostic[], moduleName?: string): string;
+}
+declare namespace ts {
+ /** The version of the language service API */
+ const servicesVersion = "0.8";
+ function toEditorSettings(options: EditorOptions | EditorSettings): EditorSettings;
+ function displayPartsToString(displayParts: SymbolDisplayPart[] | undefined): string;
+ function getDefaultCompilerOptions(): CompilerOptions;
+ function getSupportedCodeFixes(): string[];
+ function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTarget: ScriptTarget, version: string, setNodeParents: boolean, scriptKind?: ScriptKind): SourceFile;
+ function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange | undefined, aggressiveChecks?: boolean): SourceFile;
+ function createLanguageService(host: LanguageServiceHost, documentRegistry?: DocumentRegistry, syntaxOnly?: boolean): LanguageService;
+ /**
+ * Get the path of the default library files (lib.d.ts) as distributed with the typescript
+ * node package.
+ * The functionality is not supported if the ts module is consumed outside of a node module.
+ */
+ function getDefaultLibFilePath(options: CompilerOptions): string;
+}
+declare namespace ts {
+ /**
+ * Transform one or more nodes using the supplied transformers.
+ * @param source A single `Node` or an array of `Node` objects.
+ * @param transformers An array of `TransformerFactory` callbacks used to process the transformation.
+ * @param compilerOptions Optional compiler options.
+ */
+ function transform<T extends Node>(source: T | T[], transformers: TransformerFactory<T>[], compilerOptions?: CompilerOptions): TransformationResult<T>;
+}
+
+export = ts; \ No newline at end of file