diff --git a/.gitignore b/.gitignore
index 0500d05..40b0dce 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,6 +9,7 @@ build-env/*
!build-env/assets/
!build-env/typescript/
!build-env/pkg-cache
+!build-env/plugins
!build-env/package.json
.vscode
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..a6a52de
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "build-env/plugins/_example@identifier"]
+ path = build-env/plugins/_example@identifier
+ url = https://github.com/asphyxia-core/plugin-template
diff --git a/api/asphyxia-core.d.ts b/api/asphyxia-core.d.ts
new file mode 100644
index 0000000..0805cd8
--- /dev/null
+++ b/api/asphyxia-core.d.ts
@@ -0,0 +1,1060 @@
+///
+///
+
+declare type KNumberType =
+ | 's8'
+ | 'u8'
+ | 's16'
+ | 'u16'
+ | 's32'
+ | 'u32'
+ | 'time'
+ | 'ip4'
+ | 'float'
+ | 'double'
+ | 'bool';
+declare type KBigIntType = 's64' | 'u64';
+declare type KNumberGroupType =
+ | '2s8'
+ | '2u8'
+ | '2s16'
+ | '2u16'
+ | '2s32'
+ | '2u32'
+ | '2f'
+ | '2d'
+ | '3s8'
+ | '3u8'
+ | '3s16'
+ | '3u16'
+ | '3s32'
+ | '3u32'
+ | '3f'
+ | '3d'
+ | '4s8'
+ | '4u8'
+ | '4s16'
+ | '4u16'
+ | '4s32'
+ | '4u32'
+ | '4f'
+ | '4d'
+ | '2b'
+ | '3b'
+ | '4b'
+ | 'vb';
+declare type KBigIntGroupType =
+ | '2s64'
+ | '2u64'
+ | '3s64'
+ | '3u64'
+ | '4s64'
+ | '4u64'
+ | 'vs8'
+ | 'vu8'
+ | 'vs16'
+ | 'vu16';
+
+/**
+ * Attribute object
+ */
+declare type KAttrMap = { [key: string]: string };
+
+/**
+ * Supported response encoding
+ */
+declare type KEncoding = 'shift_jis' | 'utf8' | 'euc-jp' | 'ascii' | 'iso-8859-1';
+
+/**
+ * Information about requester
+ */
+declare interface EamuseInfo {
+ module: string;
+ method: string;
+ model: string;
+}
+
+/**
+ * Details of a config
+ */
+declare interface ConfigOption {
+ /** Provide a name to display in webui. If not provided, webui will use key as the name. */
+ name?: string;
+ /** Provide a description for the option */
+ desc?: string;
+ /** Type of the option */
+ type: 'string' | 'integer' | 'float' | 'boolean';
+ /** Only applies to 'integer' and 'float' */
+ range?: [number, number];
+ /** Validator for notify user about invalid values. return `true` to pass the validation. return a string to send a error message to WebUI. */
+ validator?: (data: string) => true | string;
+ /** Only applies to 'string', provide options in a dropdown menu. */
+ options?: string[];
+ /** Indicate whether user need to restart CORE to see changes. */
+ needRestart?: boolean;
+ /** Default value of the option */
+ default: any;
+}
+
+/**
+ * Details of a datafile
+ */
+declare interface FileOption {
+ /** Provide a name to display in webui. If not provided, webui will use filename as the label. */
+ name?: string;
+ /** Provide a description for the entry */
+ desc?: string;
+ /** The accept attribute of the file input element. See [[https://www.w3schools.com/tags/att_input_accept.asp]] */
+ accept?: string;
+ /** Whether the file required for the plugin to work, defaults to false */
+ required?: boolean;
+}
+
+/**
+ * Response options
+ */
+declare interface EamuseSendOption {
+ status?: number;
+
+ /**
+ * Encode response with specified encoding
+ * Default: 'SHIFT_JIS'
+ */
+ encoding?: KEncoding;
+
+ /**
+ * Replace response root tag name.
+ * Default to child tag name of request tag,
+ * which is usually the case and don't need to be replaced.
+ */
+ rootName?: string;
+
+ compress?: boolean;
+ kencode?: boolean;
+ encrypt?: boolean;
+}
+
+declare interface EamuseSend {
+ /**
+ * Send empty response with status code 0
+ */
+ success: (options?: EamuseSendOption) => Promise;
+
+ /**
+ * Send empty response with status code 1
+ */
+ deny: (options?: EamuseSendOption) => Promise;
+
+ /**
+ * Send empty response with custom status code
+ */
+ status: (code: number, options?: EamuseSendOption) => Promise;
+
+ /**
+ * Send plain javascript object.
+ * When constructing objects, make sure to use helper [[K]]:
+ * ```
+ * {
+ * outter: K.ATTR({ status: "1" }, {
+ * inner: K.ITEM("s32", 1)
+ * })
+ * }
+ * ```
+ *
+ * Or follow xml-like format manually:
+ * ```
+ * {
+ * outter: {
+ * "@attr": { status: "1" },
+ * inner: {
+ * "@attr": { __type: "s32" },
+ * "@content": [1]
+ * }
+ * }
+ * }
+ * ```
+ * @param res xml-like formatted javascript object
+ * @param options Response options. See: [[EamuseSendOption]]
+ */
+ object: (res: any, options?: EamuseSendOption) => Promise;
+
+ /**
+ * Send xml data using ejs template system.
+ *
+ * @param res xml string as the template
+ * @param data Render template with specified data,
+ * pass null or undefined to render static xml
+ * @param options Response options. See: [[EamuseSendOption]]
+ */
+ xml: (res: string, data?: any, options?: EamuseSendOption) => Promise;
+
+ /**
+ * Send xml data using pug template system.
+ *
+ * @param res pug string as the template
+ * @param data Render template with specified data,
+ * pass null or undefined to render static xml
+ * @param options Response options. See: [[EamuseSendOption]]
+ */
+ pug: (res: string, data?: any, options?: EamuseSendOption) => Promise;
+
+ /**
+ * Render and send ejs template from a file
+ *
+ * @param file Filename of the template
+ * @param data Render template with specified data,
+ * pass null or undefined to render static xml
+ * @param options Response options. See: [[EamuseSendOption]]
+ */
+ xmlFile: (file: string, data?: any, options?: EamuseSendOption) => Promise;
+
+ /**
+ * Render and send pug template from a file
+ *
+ * @param file Filename of the template
+ * @param data Render template with specified data,
+ * pass null or undefined to render static xml
+ * @param options Response options. See: [[EamuseSendOption]]
+ */
+ pugFile: (file: string, data?: any, options?: EamuseSendOption) => Promise;
+}
+
+/**
+ * Helper type for typing your custom route.
+ */
+declare type EamusePluginRoute = (req: EamuseInfo, data: any, send: EamuseSend) => Promise;
+
+/**
+ * Helper type for typing your custom route.
+ *
+ * Alias for [[EamusePluginRoute]]
+ */
+declare type EPR = EamusePluginRoute;
+
+/**
+ * R stands for `Register`
+ *
+ * These functions can only be called in plugins' `register()` function.
+ */
+declare namespace R {
+ /**
+ * Register your custom route.
+ *
+ * You should only call this from your plugin's `register()` function.
+ *
+ * @param method Method name of your target route,
+ * usually looks like `"module.get"`
+ * @param handler Your custom route function/method following the type [[EamusePluginRoute]].
+ * A boolean can be passed if you don't need any processing:
+ * - `true`: Sending empty response with status code 0
+ * - `false`: Sending empty response with status code 1
+ */
+ function Route(method: string, handler: EamusePluginRoute | boolean): void;
+
+ /**
+ * Register all unhandled routes for a game.
+ *
+ * You should only call this from your plugin's `register()` function.
+ *
+ * @param handler Your custom route function/method following the type [[EamusePluginRoute]].
+ * If undefined, the router will apply a default handler that prints method names.
+ */
+ function Unhandled(handler?: EamusePluginRoute): void;
+
+ /**
+ * Register a target game code to your plugin for checking savedata.
+ *
+ * You should only call this from your plugin's `register()` function.
+ *
+ * @param code Model code of your target machine,
+ * usually __three capital letters__
+ *
+ */
+ function GameCode(code: string): void;
+
+ /**
+ * Register a contributor.
+ *
+ * Contributors will show up in WebUI.
+ *
+ * @param name Contributor's name
+ * @param link Contributor's homepage
+ */
+ function Contributor(name: string, link?: string): void;
+
+ /**
+ * Register a configuration option.
+ *
+ * @param key config key
+ * @param options See [[ConfigOption]]
+ *
+ * __NOTE__: `options.validator` will only notify user about invalid value. It wouldn't stop user from saving invalid value.
+ */
+ function Config(key: string, options: ConfigOption): void;
+
+ /**
+ * Register a data file upload entry.
+ *
+ * @param path a path (with filename) where the uploaded file will be saved to.
+ * @param options See [[FileOption]]
+ *
+ */
+ function DataFile(path: string, options?: FileOption): void;
+
+ /**
+ * Register a WebUI event callback
+ *
+ * Which can be called in WebUI using `emit(event)` function or a post message to `/emit/`
+ *
+ * Callback can be async function if you want to use await for your DB operations.
+ */
+ function WebUIEvent(event: string, callback: (data: any) => void | Promise): void;
+}
+
+/**
+ * A warpper of javascript object for reading xml-like formatted data.
+ */
+declare class KDataReader {
+ /**
+ * Wrapped javascript object
+ */
+ public obj: any;
+ constructor(obj: any);
+
+ /**
+ * Get attrubutes for a tag
+ *
+ * Example:
+ * ```xml
+ *
+ *
+ * 1
+ * 2
+ *
+ *
+ * ```
+ * ```javascript
+ * const data = {
+ * tag: K.ATTR({ status: "1" }, {
+ * inner: [
+ * K.ITEM("s32", 1),
+ * K.ITEM("s32", 2)
+ * ]
+ * })
+ * }
+ * ```
+ *
+ * Evals:
+ * ```javascript
+ * $(data).attr("tag") // { status: "1" }
+ * $(data).element("tag").attr().status // "1"
+ * $(data).attr("tag.inner.0").__type // "s32"
+ * ```
+ */
+ attr(path?: string): KAttrMap;
+
+ /**
+ * Get a bigint value from a tag, convert to bigint if applicable.
+ *
+ * Example:
+ * ```xml
+ *
+ * 1
+ * 2
+ * abc
+ *
+ * ```
+ * ```javascript
+ * const data = {
+ * inner: [
+ * K.ITEM("s64", 1n),
+ * K.ITEM("s32", 2)
+ * ],
+ * invalid: K.ITEM("str", "abc")
+ * }
+ * ```
+ *
+ * Evals:
+ * ```javascript
+ * $(data).element("inner").bigint() // 1n
+ * $(data).bigint("inner.1") // 2n
+ * $(data).bigint("invalid", 3n) // 3n
+ * ```
+ *
+ * @param def Default return value when target path does
+ * not exists or is not valid.
+ */
+ bigint(path: string, def?: bigint): bigint;
+
+ /**
+ * Get a bigint array from a tag. Only returns valid arrays
+ * when target tag has a type of [[KBigIntType]] or [[KBigIntGroupType]]
+ *
+ * Example:
+ * ```xml
+ *
+ * 1 2
+ * 3 4
+ *
+ * ```
+ * ```javascript
+ * const data = {
+ * inner: K.ARRAY("s64", [1n, 2n]),
+ * invalid: K.ARRAY("s32", [3, 4])
+ * }
+ * ```
+ *
+ * Evals:
+ * ```javascript
+ * $(data).bigints("inner") // [1n, 2n]
+ * $(data).bigints("invalid") // undefined
+ * ```
+ */
+ bigints(path: string, def?: bigint[]): bigint[];
+
+ /**
+ * Get a boolean value from a tag, return true only if value in the tag is number and **greater than zero**
+ *
+ * Example:
+ * ```xml
+ *
+ * 0
+ * 2
+ *
+ * ```
+ * ```javascript
+ * const data = {
+ * inner: [
+ * K.ITEM("bool", false),
+ * K.ITEM("s32", 2)
+ * ]
+ * }
+ * ```
+ *
+ * Evals:
+ * ```javascript
+ * $(data).bool("inner.0") // false
+ * $(data).bool("inner.1") // true
+ * $(data).bool("invalid") // false
+ * ```
+ */
+ bool(path: string): boolean;
+
+ /**
+ * Get a Buffer object from a tag, Only returns valid Buffer
+ * when target tag has a type of "bin"
+ *
+ * Example:
+ * ```xml
+ *
+ * 00ff
+ * 1 2 3
+ *
+ * ```
+ * ```javascript
+ * const data = {
+ * inner: K.ITEM("bin", Buffer.from([0x00, 0xff])),
+ * invalid: K.ARRAY("u8", [1, 2, 3])
+ * }
+ * ```
+ *
+ * Evals:
+ * ```javascript
+ * $(data).buffer("inner") //
+ * $(data).buffer("invalid") // undefined
+ * ```
+ */
+ buffer(path: string, def?: Buffer): Buffer;
+
+ /**
+ * Get raw content representation regardless of tag type
+ *
+ * Example:
+ * ```xml
+ *
+ * 1
+ * 1 2 3
+ * abc
+ *
+ * ```
+ * ```javascript
+ * const data = {
+ * number: K.ITEM("s32", 1),
+ * array: K.ARRAY("u8", [1, 2, 3]),
+ * string: K.ITEM("str", "abc")
+ * }
+ * ```
+ *
+ * Evals:
+ * ```javascript
+ * $(data).content("number") // [1]
+ * $(data).content("array") // [1, 2, 3]
+ * $(data).content("string") // "abc"
+ * ```
+ */
+ content(path: string, def?: any): any;
+
+ /**
+ * Get first element named **path** inside a tag
+ *
+ * Example:
+ * ```xml
+ *
+ *
+ * 1
+ *
+ *
+ * 1
+ *
+ *
+ * ```
+ * ```javascript
+ * const data = {
+ * inner: [
+ * { id: K.ITEM("s32", 1) },
+ * { id: K.ITEM("s32", 2) }
+ * ]
+ * }
+ * ```
+ *
+ * Evals:
+ * ```javascript
+ * $(data).element("inner") //
+ * $(data).element("inner").obj // { id: [object] }
+ * $(data).element("inner").number("id") // 1
+ * ```
+ */
+ element(path: string): KDataReader;
+
+ /**
+ * Get array of all elements named **path** inside a tag
+ *
+ * Example:
+ * ```xml
+ *
+ *
+ * 1
+ *
+ *
+ * 1
+ *
+ *
+ * ```
+ * ```javascript
+ * const data = {
+ * inner: [
+ * { id: K.ITEM("s32", 1) },
+ * { id: K.ITEM("s32", 2) }
+ * ]
+ * }
+ * ```
+ *
+ * Evals:
+ * ```javascript
+ * $(data).elements("inner") // [, ]
+ * $(data).elements("inner")[1].number("id") // 2
+ * ```
+ */
+ elements(path: string): KDataReader[];
+
+ /**
+ * Get a number value from a tag, convert to number if applicable.
+ *
+ * Example:
+ * ```xml
+ *
+ * 1
+ * 2
+ * abc
+ *
+ * ```
+ * ```javascript
+ * const data = {
+ * inner: [
+ * K.ITEM("s64", 1n),
+ * K.ITEM("s32", 2)
+ * ],
+ * invalid: K.ITEM("str", "abc")
+ * }
+ * ```
+ *
+ * Evals:
+ * ```javascript
+ * $(data).element("inner").number() // 1
+ * $(data).number("inner.1") // 2
+ * $(data).number("invalid", 3) // 3
+ * ```
+ *
+ * @param def Default return value when target path does
+ * not exists or is not valid.
+ */
+ number(path: string, def?: number): number;
+
+ /**
+ * Get a number array from a tag. Only returns valid arrays
+ * when target tag has a type of [[KNumberType]] or [[KNumberGroupType]]
+ *
+ * Example:
+ * ```xml
+ *
+ * 1 2
+ * 3 4
+ *
+ * ```
+ * ```javascript
+ * const data = {
+ * invalid: K.ARRAY("s64", [1n, 2n]),
+ * inner: K.ARRAY("s32", [3, 4])
+ * }
+ * ```
+ *
+ * Evals:
+ * ```javascript
+ * $(data).bigints("invalid") // undefined
+ * $(data).bigints("inner") // [3, 4]
+ * ```
+ */
+ numbers(path: string, def?: number[]): number[];
+
+ /**
+ * Get a string from a tag, Only returns valid string
+ * when target tag has a type of "str"
+ *
+ * Example:
+ * ```xml
+ *
+ * abc
+ * 1
+ *
+ * ```
+ * ```javascript
+ * const data = {
+ * inner: K.ITEM("str", "abc"),
+ * invalid: K.ITEM("s32", 1)
+ * }
+ * ```
+ *
+ * Evals:
+ * ```javascript
+ * $(data).str("inner") // "abc"
+ * $(data).str("invalid") // undefined
+ * ```
+ */
+ str(path: string, def?: string): string;
+}
+
+/**
+ * Helper for reading xml-like formatted data.
+ */
+declare function $(data: any): KDataReader;
+declare namespace $ {
+ function ATTR(data: any, path?: string): KAttrMap;
+ function BIGINT(data: any, path: string, def?: bigint): bigint;
+ function BIGINTS(data: any, path: string, def?: bigint[]): bigint[];
+ function BOOL(data: any, path: string): boolean;
+ function BUFFER(data: any, path: string, def?: Buffer): Buffer;
+ function CONTENT(data: any, path: string, def?: any): any;
+ function ELEMENT(data: any, path: string, def?: any): any;
+ function ELEMENTS(data: any, path: string, def?: any): any;
+ function NUMBER(data: any, path: string, def?: number): number;
+ function NUMBERS(data: any, path: string, def?: number[]): number[];
+ function STR(data: any, path: string, def?: string): string;
+}
+
+/** @ignore */
+declare interface KITEM<
+ S extends
+ | KNumberType
+ | KBigIntType
+ | KNumberGroupType
+ | KBigIntGroupType
+ | 'str'
+ | 'bool'
+ | 'bin'
+ | 'ip4'
+> {
+ '@attr': {
+ __type: S;
+ };
+ '@content': S extends 'str'
+ ? string
+ : S extends 'bin'
+ ? Buffer
+ : S extends KNumberType | 'ip4' | 'bool'
+ ? [number]
+ : S extends KBigIntType
+ ? [bigint]
+ : S extends KNumberGroupType
+ ? number[]
+ : S extends KBigIntGroupType
+ ? bigint[]
+ : unknown;
+}
+
+/** @ignore */
+declare interface KARRAY {
+ '@attr': {
+ __count: number;
+ __type: S;
+ };
+ '@content': S extends KNumberType ? number[] : S extends KBigIntType ? bigint[] : unknown;
+}
+
+/** @ignore */
+declare interface KATTR {
+ '@attr': M;
+}
+
+/**
+ * K stands for `Konstruct`
+ *
+ * Helper for constructing xml-like javascript object.
+ */
+declare namespace K {
+ /**
+ * Example:
+ * ```
+ * {
+ * tag: K.ATTR({attr: "1"}, {
+ * inner: [{}, {}]
+ * })
+ * }
+ * ```
+ * Represents:
+ * ```
+ *
+ *
+ *
+ *
+ * ```
+ * @param attr Attribute map
+ * @param inner Inner tag/data
+ */
+ function ATTR(attr: M, inner?: T): KATTR & T;
+
+ /**
+ * Example:
+ * ```
+ * {
+ * tag: K.ITEM('s32', 1, {attr: "2"})
+ * }
+ * ```
+ * Represents:
+ * ```
+ * 1
+ * ```
+ * @param type ____type__ attribute, which is used during encoding and compression
+ * @param content data of specified type
+ * @param attr attribute map in addition to **__type**
+ */
+ function ITEM(type: 'str', content: string, attr?: KAttrMap): KITEM<'str'>;
+ function ITEM(type: 'bin', content: Buffer, attr?: KAttrMap): KITEM<'bin'>;
+ function ITEM(type: 'ip4', content: string, attr?: KAttrMap): KITEM<'ip4'>;
+ function ITEM(type: 'bool', content: boolean, attr?: KAttrMap): KITEM<'bool'>;
+ function ITEM(type: S, content: number, attr?: KAttrMap): KITEM;
+ function ITEM(type: S, content: bigint, attr?: KAttrMap): KITEM;
+ function ITEM(type: S, content: number[], attr?: KAttrMap): KITEM;
+ function ITEM(type: S, content: bigint[], attr?: KAttrMap): KITEM;
+
+ /**
+ * Example:
+ * ```
+ * {
+ * tag: K.ARRAY('s32', [1, 2, 3], {attr: "4"})
+ * }
+ * ```
+ * Represents:
+ * ```
+ * 1 2 3
+ * ```
+ * @param type ____type__ attribute, which is used during encoding and compression
+ * @param content array of data, ____count__ attribute will be automatically set to `content.length`
+ * @param attr attribute map in addition to **__type** and **__count**
+ */
+ function ARRAY(type: S, content: Buffer, attr?: KAttrMap): KARRAY;
+ function ARRAY(type: S, content: number[], attr?: KAttrMap): KARRAY;
+ function ARRAY(type: S, content: bigint[], attr?: KAttrMap): KARRAY;
+}
+
+/**
+ * Filesystem IO
+ *
+ * These are designed to match nodejs `fs` module.
+ *
+ * __DO NOT__ use IO for savedata. Please use [[DB]] namespace so your data can be managed by WebUI.
+ *
+ * Also, due to difference between operating systems, you should always prepare your files using ascii path.
+ * Both UTF-8 and local encodings will have cross-platform compatibility issues.
+ */
+declare namespace IO {
+ /**
+ * Resolve a relative path starting from your plugin directory to an absolute path.
+ */
+ function Resolve(path: string): string;
+
+ /**
+ * Asynchronously read a directory.
+ * @param path A path to a directory.
+ */
+ function ReadDir(path: string): Promise<{ name: string; type: 'file' | 'dir' | 'unsupported' }[]>;
+
+ /**
+ * Asynchronously writes data to a file, replacing the file if it already exists.
+ * @param path A path to a file.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
+ * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
+ * If `encoding` is not supplied, the default of `'utf8'` is used.
+ * If `mode` is not supplied, the default of `0o666` is used.
+ * If `mode` is a string, it is parsed as an octal integer.
+ * If `flag` is not supplied, the default of `'w'` is used.
+ */
+ function WriteFile(
+ path: string,
+ data: any,
+ options: { encoding?: string | null; mode?: number | string; flag?: string } | string | null
+ ): Promise;
+
+ /**
+ * Asynchronously writes data to a file, replacing the file if it already exists.
+ * @param path A path to a file.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
+ */
+ function WriteFile(path: string, data: any): Promise;
+
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options An object that may contain an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ function ReadFile(
+ path: string,
+ options: { encoding?: null; flag?: string } | undefined | null
+ ): Promise;
+
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ function ReadFile(
+ path: string,
+ options: { encoding: string; flag?: string } | string
+ ): Promise;
+
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
+ * If a flag is not provided, it defaults to `'r'`.
+ */
+ function ReadFile(
+ path: string,
+ options: { encoding?: string | null; flag?: string } | string | undefined | null
+ ): Promise;
+
+ /**
+ * Asynchronously reads the entire contents of a file.
+ * @param path A path to a file.
+ * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
+ */
+ function ReadFile(path: string): Promise;
+}
+
+/**
+ * U stands for `Utilities`
+ *
+ * You can find miscellaneous helpers here
+ */
+declare namespace U {
+ /**
+ * Convert json data to xml string.
+ *
+ * @param data xml-like javascript object
+ */
+ function toXML(data: any): string;
+
+ /**
+ * Convert xml string to javascript object. Output will always be plain javascript string.
+ *
+ * @param xml xml string
+ * @param simplify if true, the parser will ignore attributes and only generate string values. (default: true)
+ */
+ function parseXML(xml: string, simplify?: boolean): any;
+
+ /**
+ * Get config from user configuration file.
+ * @param key
+ */
+ function GetConfig(key: string): any;
+}
+
+/** @ignore */
+type Doc = { _id?: string } & T;
+/** @ignore */
+type ProfileDoc = { _id?: string; __refid?: string } & T;
+/** @ignore */
+type Query = {
+ [P in keyof T]?:
+ | T[P]
+ | (T[P] extends Array
+ ? { $elemMatch: Query } | { $size: number }
+ : T[P] extends number | string
+ ?
+ | { $lt: T[P] }
+ | { $lte: T[P] }
+ | { $gt: T[P] }
+ | { $gte: T[P] }
+ | { $in: T[P][] }
+ | { $ne: any }
+ | { $nin: any[] }
+ | { $regex: RegExp }
+ : T[P] extends object
+ ? Query
+ : T[P])
+ | { $exists: boolean };
+} & {
+ $or?: Query[];
+ $and?: Query[];
+ $not?: Query;
+ $where?: (this: T) => boolean;
+ _id?: string;
+ [path: string]: any;
+};
+/** @ignore */
+type Operators = '$exists' | '$lt' | '$lte' | '$gt' | '$gte' | '$in' | '$ne' | '$nin' | '$regex';
+/** @ignore */
+type PickyOperator = Pick<
+ {
+ [P in keyof T]?: T[P] extends C ? F : Omit;
+ },
+ {
+ [P in keyof T]: T[P] extends C ? P : never;
+ }[keyof T]
+>;
+/** @ignore */
+type ArrayPushOperator = Pick<
+ {
+ [P in keyof T]?: T[P] extends Array ? E | { $each?: E[]; $slice?: number } : never;
+ },
+ { [P in keyof T]: T[P] extends Array ? P : never }[keyof T]
+> & { [path: string]: any | { $each?: any[]; $slice?: number } };
+/** @ignore */
+type ArraySetOperator = Pick<
+ {
+ [P in keyof T]?: T[P] extends Array ? E | { $each: E[] } : never;
+ },
+ { [P in keyof T]: T[P] extends Array ? P : never }[keyof T]
+> & { [path: string]: any | { $each: any[] } };
+/** @ignore */
+type ArrayInOperator = Pick<
+ {
+ [P in keyof T]?: T[P] extends Array ? E | { $in: E[] } : never;
+ },
+ { [P in keyof T]: T[P] extends Array ? P : never }[keyof T]
+> & { [path: string]: any | { $in: any[] } };
+/** @ignore */
+type ArrayPopOperator = Pick<
+ {
+ [P in keyof T]?: T[P] extends Array ? -1 | 1 : never;
+ },
+ { [P in keyof T]: T[P] extends Array ? P : never }[keyof T]
+> & { [path: string]: -1 | 1 };
+/** @ignore */
+type Update = Partial & {
+ $unset?: PickyOperator & { [path: string]: true };
+ $set?: { [P in keyof T]?: Omit } & { [path: string]: any };
+ $min?: PickyOperator & { [path: string]: number };
+ $max?: PickyOperator & { [path: string]: number };
+ $inc?: PickyOperator & { [path: string]: number };
+ $push?: ArrayPushOperator;
+ $addToSet?: ArraySetOperator;
+ $pop?: ArrayPopOperator;
+ $pull?: ArrayInOperator;
+} & {
+ [path: string]: any;
+};
+
+/**
+ * Database operation.
+ *
+ * There are two pools of data for each plugin: ___PluginSpace___ and __ProfileSpace__
+ *
+ * If `refid` is a string, query will match a specific profile data in __ProfileSpace__.
+ *
+ * If `refid` is null, query will match all profile data in __ProfileSpace__.
+ * (doesn't apply to [[DB.Insert]])
+ *
+ * If `refid` is not provided, query will match data in ___PluginSpace___.
+ *
+ * ---
+ *
+ * **NOTE**: since WebUI can delete data in __ProfileSpace__,
+ * you should refrain from referencing refid in your document to prevent getting unclearable garbage data.
+ *
+ * If you need to make rival/friend feature, we recommend you to get all profile data by passing null to `refid`.
+ * There will be 16 profiles maximum which is small enough to manage.
+ *
+ * All query and doc should not have any fields start with `__` while `__refid` being the only exception.
+ * However, `__refid` field will still be ignored while other `__` starting fields will cause an error to be thrown.
+ */
+declare namespace DB {
+ function FindOne(refid: string | null, query: Query): Promise>;
+ function FindOne(query: Query): Promise>;
+
+ function Find(refid: string | null, query: Query): Promise[]>;
+ function Find(query: Query): Promise[]>;
+
+ function Insert(refid: string, doc: T): Promise>;
+ function Insert(doc: T): Promise>;
+
+ function Remove(refid: string | null, query: Query): Promise;
+ function Remove(query: Query): Promise;
+
+ function Update(
+ refid: string | null,
+ query: Query,
+ update: Update
+ ): Promise<{
+ updated: number;
+ docs: ProfileDoc[];
+ }>;
+ function Update(
+ query: Query,
+ update: Update
+ ): Promise<{
+ updated: number;
+ docs: Doc[];
+ }>;
+
+ function Upsert(
+ refid: string,
+ query: Query,
+ update: Update
+ ): Promise<{
+ updated: number;
+ docs: ProfileDoc[];
+ upsert: boolean;
+ }>;
+ function Upsert(
+ query: Query,
+ update: Update
+ ): Promise<{
+ updated: number;
+ docs: Doc[];
+ upsert: boolean;
+ }>;
+
+ function Count(refid: string | null, query: Query): Promise;
+ function Count(query: Query): Promise;
+}
+
+/** @ignore */
+// @ts-ignore
+declare const _: any;
diff --git a/api/typedoc.json b/api/typedoc.json
new file mode 100644
index 0000000..4344abd
--- /dev/null
+++ b/api/typedoc.json
@@ -0,0 +1,9 @@
+{
+ "includeDeclarations": true,
+ "excludeExternals": true,
+ "externalPattern": ["!asphyxia-core.d.ts"],
+ "mode": "file",
+ "readme": "../docs/_typedoc.md",
+ "name": "Asphyxia CORE Module API",
+ "out": "../docs/typedoc"
+}
diff --git a/build-env/package.json b/build-env/package.json
index 4aec7c8..9c29710 100644
--- a/build-env/package.json
+++ b/build-env/package.json
@@ -11,7 +11,6 @@
},
"pkg": {
"assets": [
- "./node_modules/typescript",
"./assets"
]
},
diff --git a/build-env/plugins/_example@identifier b/build-env/plugins/_example@identifier
new file mode 160000
index 0000000..27f1a25
--- /dev/null
+++ b/build-env/plugins/_example@identifier
@@ -0,0 +1 @@
+Subproject commit 27f1a259b57ad4bc82b1fbdce7fb67a5be653a22
diff --git a/build-env/plugins/package.json b/build-env/plugins/package.json
new file mode 100644
index 0000000..49a269e
--- /dev/null
+++ b/build-env/plugins/package.json
@@ -0,0 +1,9 @@
+{
+ "name": "asphyxia-plugins",
+ "version": "1.0.0",
+ "description": "Community Plugins for Asphyxia CORE",
+ "dependencies": {
+ "@types/lodash": "^4.14.153",
+ "@types/node": "^14.0.5"
+ }
+}
diff --git a/build-env/plugins/tsconfig.json b/build-env/plugins/tsconfig.json
new file mode 100644
index 0000000..cd9a68c
--- /dev/null
+++ b/build-env/plugins/tsconfig.json
@@ -0,0 +1,10 @@
+{
+ "compilerOptions": {
+ "module": "commonjs",
+ "target": "esnext",
+ "noImplicitAny": false,
+ "moduleResolution": "node",
+ "types": ["./asphyxia-core"],
+ "sourceMap": false
+ }
+}
diff --git a/build-env/typescript/lib/lib.d.ts b/build-env/typescript/lib/lib.d.ts
deleted file mode 100644
index 9152c4d..0000000
--- a/build-env/typescript/lib/lib.d.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/*! *****************************************************************************
-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.
-***************************************************************************** */
-
-
-
-///
-
-
-///
-///
-///
-///
diff --git a/build-env/typescript/lib/lib.dom.d.ts b/build-env/typescript/lib/lib.dom.d.ts
deleted file mode 100644
index 86c4043..0000000
--- a/build-env/typescript/lib/lib.dom.d.ts
+++ /dev/null
@@ -1,20050 +0,0 @@
-/*! *****************************************************************************
-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.
-***************************************************************************** */
-
-
-
-///
-
-
-/////////////////////////////
-/// 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;
- 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 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;
- 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;
-}
-
-interface PushSubscriptionOptionsInit {
- applicationServerKey?: BufferSource | string | null;
- userVisibleOnly?: boolean;
-}
-
-interface QueuingStrategy {
- highWaterMark?: number;
- size?: QueuingStrategySizeCallback;
-}
-
-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 {
- done: true;
- value?: T;
-}
-
-interface ReadableStreamReadValueResult {
- 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 {
- flush?: TransformStreamDefaultControllerCallback;
- readableType?: undefined;
- start?: TransformStreamDefaultControllerCallback;
- transform?: TransformStreamDefaultControllerTransformCallback;
- 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 {
- abort?: WritableStreamErrorCallback;
- close?: WritableStreamDefaultControllerCloseCallback;
- start?: WritableStreamDefaultControllerStartCallback;
- type?: undefined;
- write?: WritableStreamDefaultControllerWriteCallback;
-}
-
-interface UnderlyingSource {
- cancel?: ReadableStreamErrorCallback;
- pull?: ReadableStreamDefaultControllerCallback;
- start?: ReadableStreamDefaultControllerCallback;
- 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(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
- removeEventListener(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(type: K, listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
- removeEventListener(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;
- 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;
- startTime: number | null;
- timeline: AnimationTimeline | null;
- cancel(): void;
- finish(): void;
- pause(): void;
- play(): void;
- reverse(): void;
- updatePlaybackRate(playbackRate: number): void;
- addEventListener(type: K, listener: (this: Animation, ev: AnimationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
- removeEventListener(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;
- "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) => 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(type: K, listener: (this: ApplicationCache, ev: ApplicationCacheEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
- removeEventListener(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(type: K, listener: (this: AudioBufferSourceNode, ev: AudioScheduledSourceNodeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
- removeEventListener(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;
- createMediaElementSource(mediaElement: HTMLMediaElement): MediaElementAudioSourceNode;
- createMediaStreamDestination(): MediaStreamAudioDestinationNode;
- createMediaStreamSource(mediaStream: MediaStream): MediaStreamAudioSourceNode;
- createMediaStreamTrackSource(mediaStreamTrack: MediaStreamTrack): MediaStreamTrackAudioSourceNode;
- getOutputTimestamp(): AudioTimestamp;
- resume(): Promise;
- suspend(): Promise;
- addEventListener(type: K, listener: (this: AudioContext, ev: BaseAudioContextEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
- removeEventListener(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(type: K, listener: (this: AudioScheduledSourceNode, ev: AudioScheduledSourceNodeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
- removeEventListener(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(type: K, listener: (this: AudioWorkletNode, ev: AudioWorkletNodeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
- removeEventListener(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;
- addEventListener(type: K, listener: (this: BaseAudioContext, ev: BaseAudioContextEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
- removeEventListener(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;
- slice(start?: number, end?: number, contentType?: string): Blob;
- stream(): ReadableStream;
- text(): Promise;
-}
-
-declare var Blob: {
- prototype: Blob;
- new(blobParts?: BlobPart[], options?: BlobPropertyBag): Blob;
-};
-
-interface Body {
- readonly body: ReadableStream | null;
- readonly bodyUsed: boolean;
- arrayBuffer(): Promise;
- blob(): Promise;
- formData(): Promise;
- json(): Promise;
- text(): Promise;
-}
-
-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(type: K, listener: (this: BroadcastChannel, ev: BroadcastChannelEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
- removeEventListener(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 {
- 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;
- addAll(requests: RequestInfo[]): Promise;
- delete(request: RequestInfo, options?: CacheQueryOptions): Promise;
- keys(request?: RequestInfo, options?: CacheQueryOptions): Promise>;
- match(request: RequestInfo, options?: CacheQueryOptions): Promise;
- matchAll(request?: RequestInfo, options?: CacheQueryOptions): Promise>;
- put(request: RequestInfo, response: Response): Promise;
-}
-
-declare var Cache: {
- prototype: Cache;
- new(): Cache;
-};
-
-/** The storage for Cache objects. */
-interface CacheStorage {
- delete(cacheName: string): Promise;
- has(cacheName: string): Promise;
- keys(): Promise;
- match(request: RequestInfo, options?: MultiCacheQueryOptions): Promise;
- open(cacheName: string): Promise;
-}
-
-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